/* Contact Engagement App Styles */

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.install-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.install-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
}

/* Controls */
.controls {
    margin-bottom: 2rem;
}

.search-bar {
    margin-bottom: 1rem;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(76, 175, 80, 0.1);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Contact Cards */
.contacts-container {
    display: grid;
    gap: 1rem;
}

.contact-card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.contact-card.overdue {
    border-left: 4px solid #f44336;
}

.contact-card.due-soon {
    border-left: 4px solid #ff9800;
}

.contact-card.good {
    border-left: 4px solid var(--primary-color);
}

.contact-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.contact-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.icon-btn:hover {
    opacity: 1;
}

.contact-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-indicator.overdue {
    background: #f44336;
}

.status-indicator.due-soon {
    background: #ff9800;
}

.status-indicator.good {
    background: var(--primary-color);
}

.status-text {
    flex: 1;
    font-size: 0.875rem;
}

.contact-notes {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.contact-footer {
    display: flex;
    gap: 0.5rem;
}

.btn-contacted {
    flex: 1;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-contacted:hover {
    background: var(--primary-dark);
}

.btn-edit {
    padding: 0.75rem 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: #1976D2;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--text-primary);
}

/* Form */
form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

.interval-input {
    display: flex;
    gap: 0.5rem;
}

.interval-input input {
    flex: 1;
}

.interval-input select {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Modal Divider */
.modal-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 1.5rem;
    color: var(--text-secondary);
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.modal-divider span {
    padding: 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Import Section */
.import-section {
    padding: 0 1.5rem 1.5rem;
    text-align: center;
}

.import-section button {
    width: 100%;
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
}

.fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-content h1 {
        order: -1;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .back-btn {
        flex: 1;
    }
    
    .install-btn {
        flex: 1;
    }
    
    .fab-container {
        bottom: 1rem;
        right: 1rem;
    }
    
    .fab {
        width: 56px;
        height: 56px;
    }
}
