/* Tider modal styles - extracted for reusability */

/* Schema full width toggle styles */
.tider-container .schema-section.schema-fullwidth {
    max-width: 100% !important;
    width: 100% !important;
}

/* Modal styles for tider functionality */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e7eb;
    background-color: #f9fafb;
    border-radius: 8px 8px 0 0;
}

.modal-body {
    padding: 20px;
}

.close {
    color: #6b7280;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #374151;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
}

.form-row {
    display: flex;
    gap: 12px;
    align-items: end;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
    border-color: #4b5563;
}

.btn-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.btn-danger:hover {
    background-color: #fecaca;
    border-color: #fca5a5;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.form-actions-left {
    display: flex;
    gap: 8px;
}

.form-actions-right {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Ny tid modal: keep Avbryt beside Spara/Uppdatera even on narrow screens */
@media (max-width: 520px) {
    #ny-tid-modal .form-actions {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Put primary actions on first row, delete on its own row */
    #ny-tid-modal .form-actions-right {
        width: 100%;
        order: 1;
    }

    #ny-tid-modal .form-actions-right .btn {
        flex: 1;
    }

    #ny-tid-modal .form-actions-left {
        width: 100%;
        order: 2;
    }
}

.recurrence-container {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px;
    background-color: #f9fafb;
}

.recurrence-options {
    margin-top: 12px;
}

.recurrence-sub-option {
    margin-top: 8px;
    margin-left: 16px;
}

.day-checkboxes {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}
