/* Prayer 24h Plugin Styles */

.prayer-24h-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.prayer-24h-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.prayer-24h-header h2 {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: 700;
}

.prayer-24h-user-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.prayer-24h-timezone-bar {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.prayer-24h-timezone-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
}

.prayer-24h-timezone-select {
    min-width: 160px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 10px;
}

.prayer-24h-timezone-select option {
    color: #222;
}

.prayer-24h-logged-in {
    display: block;
    margin-bottom: 10px;
}

.prayer-24h-user-status .button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.prayer-24h-user-status .button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Schedule Grid */
.prayer-24h-schedule {
    margin-bottom: 40px;
    min-height: 300px;
}

.prayer-24h-schedule-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.prayer-24h-schedule-controls input[type="date"] {
    max-width: 220px;
}

.prayer-24h-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    font-size: 16px;
    color: #666;
}

.prayer-24h-spinner::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.prayer-24h-schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.prayer-24h-time-slot {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.prayer-24h-time-slot:hover {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.12);
    transform: translateY(-2px);
}

.prayer-24h-time-slot.has-entries {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.02);
}

.prayer-24h-time {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 10px;
}

.prayer-24h-attendees {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.prayer-24h-flags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.prayer-24h-flag {
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    vertical-align: middle;
    margin-right: 4px;
}

.prayer-24h-add-entry-trigger {
    margin-top: 24px;
    text-align: center;
}

.prayer-24h-open-add-modal {
    width: auto;
    min-width: 260px;
}

.prayer-24h-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.prayer-24h-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.prayer-24h-add-modal {
    max-width: 700px;
}

.prayer-24h-modal h3 {
    margin-top: 0;
}

.prayer-24h-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.prayer-24h-modal-actions .button-primary {
    width: auto;
    margin-top: 0;
}

.prayer-24h-nation-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.prayer-24h-nation-flag-preview {
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.attendees-list {
    margin: 20px 0;
}

.attendee-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.attendee-item:last-child {
    border-bottom: none;
}

.prayer-24h-add-entry {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin-top: 40px;
}

.prayer-24h-add-entry h3 {
    margin-top: 0;
    color: #333;
}

/* Forms */
.prayer-24h-form-wrapper {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    margin: 20px auto;
}

.prayer-24h-form-wrapper h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.prayer-24h-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.prayer-24h-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.prayer-24h-recurring-wrap.is-anonymous {
    opacity: 0.85;
}

.prayer-24h-muted {
    color: #666;
    font-size: 13px;
}

.prayer-24h-all-entries {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.prayer-24h-all-list {
    overflow-x: auto;
}

.prayer-24h-table {
    width: 100%;
    border-collapse: collapse;
}

.prayer-24h-table th,
.prayer-24h-table td {
    text-align: left;
    border-bottom: 1px solid #eee;
    padding: 10px 8px;
}

.prayer-24h-table th {
    font-weight: 700;
    color: #333;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#prayer-24h-entry-timezone {
    width: 100%;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.button-primary {
    background: #667eea;
    color: white;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
}

.button-primary:hover {
    background: #5568d3;
}

.button-secondary {
    background: #f0f0f0;
    color: #333;
}

.button-secondary:hover {
    background: #e0e0e0;
}

/* Status messages */
.prayer-24h-status {
    margin-top: 10px;
    padding: 12px;
    border-radius: 6px;
    display: none;
    font-size: 14px;
}

.prayer-24h-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.prayer-24h-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.prayer-24h-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* Form hints */
.prayer-24h-form-hint {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 20px;
}

.prayer-24h-form-hint a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.prayer-24h-form-hint a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .prayer-24h-schedule-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .prayer-24h-schedule-controls input[type="date"] {
        width: 100%;
        max-width: none;
    }

    .prayer-24h-schedule-grid {
        grid-template-columns: 1fr;
    }
    
    .prayer-24h-header {
        padding: 20px;
    }
    
    .prayer-24h-header h2 {
        font-size: 24px;
    }
    
    .prayer-24h-user-status {
        flex-direction: column;
        align-items: flex-start;
    }

    .prayer-24h-timezone-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .prayer-24h-form-wrapper {
        margin: 10px;
        padding: 20px;
    }

    .prayer-24h-row {
        grid-template-columns: 1fr;
    }
    
    .prayer-24h-add-entry {
        padding: 20px;
    }

    .prayer-24h-modal {
        padding: 16px;
    }

    .prayer-24h-open-add-modal {
        width: 100%;
        min-width: 0;
    }
}

/* Utility classes */
.prayer-24h-wrapper p {
    margin: 0 0 15px 0;
}

.prayer-24h-wrapper h3 {
    margin: 0 0 15px 0;
}

.attendee-time-row {
    margin-top: 6px;
    color: #666;
}
