/* Event Reminder System - Styles */

:root {
    --primary: #25D366; /* WhatsApp green */
    --primary-dark: #128C7E;
    --secondary: #34B7F1;
    --danger: #e74c3c;
    --text: #1a1a1a;
    --text-light: #666;
    --bg: #f0f2f5;
    --card-bg: #ffffff;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-light);
    font-size: 0.8rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.radio-label:hover {
    border-color: var(--primary);
}

.radio-label input {
    display: none;
}

.radio-label input:checked + span {
    color: var(--primary-dark);
    font-weight: 500;
}

.radio-label:has(input:checked) {
    border-color: var(--primary);
    background: rgba(37, 211, 102, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
}

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

.btn-primary:disabled {
    background: var(--border);
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.1rem;
}

/* Events List */
.events-list {
    min-height: 100px;
}

.events-list .loading,
.events-list .empty {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
}

.date-group {
    margin-bottom: 20px;
}

.date-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.date-header .recurring-badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    background: rgba(37, 211, 102, 0.1);
    color: var(--primary-dark);
    border-radius: 10px;
    font-weight: 500;
}

.event-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.event-item:hover {
    transform: translateX(4px);
}

.event-emoji {
    font-size: 1.5rem;
    margin-right: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
}

.event-details {
    flex: 1;
    min-width: 0;
}

.event-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 1.1rem;
    opacity: 0.5;
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    opacity: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    max-width: 400px;
    width: 100%;
}

.modal-content h3 {
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.btn-cancel {
    background: var(--bg);
    color: var(--text);
}

.btn-cancel:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1001;
    max-width: 90%;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--primary-dark);
}

.toast.error {
    background: var(--danger);
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 20px;
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .card {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-group {
        gap: 6px;
    }

    .radio-label {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
}

/* Category colors */
.category-wedding { border-left: 3px solid #e74c3c; }
.category-birthday { border-left: 3px solid #9b59b6; }
.category-meeting { border-left: 3px solid #2ecc71; }
.category-anniversary { border-left: 3px solid #e91e63; }
.category-religious { border-left: 3px solid #00bcd4; }
.category-social { border-left: 3px solid #ff9800; }
.category-other { border-left: 3px solid #607d8b; }
