/* Reminder Setup Page Styles */

/* Statement Builder Styles */
.statement-builder {
    border-left: 4px solid var(--primary-color);
}

.statement-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.2rem;
    line-height: 2.5;
}

.statement-line {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.statement-select,
.statement-input {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 200px;
}

.statement-select:hover,
.statement-input:hover {
    background: rgba(1, 162, 180, 0.1);
    transform: translateY(-1px);
}

.statement-select:disabled,
.statement-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #999;
}

.statement-select:disabled:hover {
    background: white;
    transform: none;
}

.statement-input {
    cursor: text;
}

.feature-status .badge {
    font-size: 0.9rem;
    text-align: left;
}

/* Step-by-step wizard styles */
.setup-step {
    margin-bottom: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.setup-step.completed {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.02);
}

.step-header {
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.step-header:hover {
    background: #e9ecef;
}

.step-header.active {
    background: rgba(1, 162, 180, 0.08);
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6c757d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.setup-step.completed .step-number {
    background: #28a745;
}

.step-title-wrapper {
    flex: 1;
}

.step-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-color);
}

.step-subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0.25rem 0 0 0;
}

.step-icon {
    font-size: 1.5rem;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.step-header.active .step-icon {
    transform: rotate(180deg);
}

.step-content {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    display: none;
}

#setupSummary {
    border-left: 4px solid #01A2B4;
}

#setupSummary .badge {
    font-size: 0.9em;
    padding: 0.35em 0.65em;
}

#summaryMessage {
    font-size: 0.9em;
}

.intro-card {
    background: linear-gradient(135deg, rgba(1, 162, 180, 0.08) 0%, rgba(1, 162, 180, 0.02) 100%);
    border: 2px solid rgba(1, 162, 180, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.intro-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.summary-box {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.summary-box h6 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.summary-box ul {
    margin-bottom: 0;
}

.summary-box li {
    margin-bottom: 0.5rem;
}

.action-buttons {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 1rem;
    border-top: 2px solid #e9ecef;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
    margin: 1rem -1rem -1rem -1rem;
    border-radius: 0 0 12px 12px;
}

.reminder-options-container {
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.25rem;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.reminder-option-row {
    display: block;
    padding: 0 !important;
    margin: 0 !important;
}

.reminder-option-row * {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.option-text {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
    margin-left: 0;
    padding-left: 0;
}

.option-text strong {
    display: block;
    font-size: 1rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    margin-left: 0 !important;
    padding-left: 0 !important;
    word-break: break-word;
    font-family: var(--primary-font);
    color: var(--text-color);
}

.option-controls {
    display: block;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
}

.form-check.form-switch {
    display: block;
    margin-bottom: 0.5rem;
    margin-left: 0 !important;
    padding-left: 0 !important;
    white-space: nowrap;
}

.form-check.form-switch .form-check-input {
    margin-left: 0 !important;
    position: static !important;
}

.form-check.form-switch .form-check-label {
    padding-left: 0 !important;
    margin-left: 0.5rem !important;
}

.datetime-input {
    display: block;
    width: 200px;
    max-width: 200px;
    min-width: 200px;
    clear: both;
    overflow: hidden;
    box-sizing: border-box;
    margin-left: 0;
    padding-left: 0;
}

@media (max-width: 576px) {
    .datetime-input {
        width: 100%;
        max-width: 100%;
        min-width: 100%;
    }
}

/* Event time field styling */
.event-time-input[readonly] {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
    opacity: 0.9 !important;
}

.event-time-input.ai-inferred {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
}

.datetime-input .form-label.small {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.25rem !important;
}

.datetime-input input[type="datetime-local"].form-control,
.datetime-input .form-control[type="datetime-local"],
.datetime-input input[type="datetime-local"],
input[type="datetime-local"].form-control,
input[type="datetime-local"] {
    width: 200px !important;
    max-width: 200px !important;
    min-width: 200px !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 4px !important;
    border: 1px solid var(--border-color) !important;
    transition: all 0.2s ease !important;
    font-family: var(--primary-font) !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    display: block !important;
}

.datetime-input .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(1, 162, 180, 0.1);
}

.form-check.form-switch .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check.form-switch .form-check-label {
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.reminder-options-container .card {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.reminder-options-container .card-body {
    padding: 0.1rem;
}

.reminder-options-container .card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(1, 162, 180, 0.15);
    transform: translateY(-1px);
}

.reminder-options-container .card:last-child {
    margin-bottom: 0;
}

.reminder-option-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.2s ease;
}

.reminder-option-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(1, 162, 180, 0.1);
    background: white;
}

.reminder-option-item .option-text {
    color: var(--text-color);
    font-size: 1rem;
}

/* Options Grid Table Styles */
#optionsTable {
    margin-bottom: 0;
}

#optionsTable thead th {
    background: rgba(1, 162, 180, 0.05);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem;
}

#optionsTable tbody tr {
    transition: all 0.2s ease;
}

#optionsTable tbody tr:hover {
    background: rgba(1, 162, 180, 0.03);
}

#optionsTable td {
    padding: 0.75rem;
    vertical-align: middle;
}

#optionsTable .form-control-sm {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
}

#optionsTable .event-time-input[readonly] {
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
}

#optionsTable .event-time-input.ai-inferred {
    background-color: #fff3cd !important;
    border-color: #ffc107 !important;
}

#optionsTable .reminder-time-input,
#optionsTable .reminder2-column .reminder-time-input {
    font-weight: 600;
    color: var(--primary-color);
    background-color: #f8f9fa !important;
    cursor: not-allowed !important;
}

#optionsTable .reminder-time-input + small,
#optionsTable .reminder2-column .reminder-time-input + small {
    font-size: 0.75rem;
    color: #6c757d;
}

.reminder-setup-container {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    padding: 0;
}

@media (min-width: 1400px) {
    .reminder-setup-container {
        max-width: 100%;
        padding: 0 1rem;
    }
}

@media (min-width: 768px) {
    .reminder-setup-container {
        max-width: 100%;
        padding: 0 0.5rem;
    }
}

.settings-section {
    background: linear-gradient(135deg, #f8fafc 0%, rgba(1, 162, 180, 0.02) 100%);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.settings-section.border-primary {
    border-color: var(--primary-color) !important;
    background: linear-gradient(135deg, rgba(1, 162, 180, 0.05) 0%, rgba(1, 162, 180, 0.02) 100%);
}

.settings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0px;
    background: transparent;
}

.settings-section h4 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-family: var(--heading-font);
    font-weight: 600;
}

/* Enhanced styling for reminder setup page - Override Bootstrap */
.reminder-setup .form-select-lg,
.form-select-lg {
    font-size: 1.1rem !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    border: 2px solid var(--border-color) !important;
    transition: all 0.2s ease !important;
    font-family: var(--primary-font) !important;
}

.reminder-setup .form-select-lg.border-primary:focus,
.form-select-lg.border-primary:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(1, 162, 180, 0.25) !important;
}

.reminder-setup .form-select-lg.border-primary:not([value=""]),
.form-select-lg.border-primary:not([value=""]) {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border-color: #28a745 !important;
}

.reminder-setup .form-label.fw-bold,
.form-label.fw-bold {
    font-size: 1.1rem !important;
    color: var(--text-color) !important;
    font-family: var(--heading-font) !important;
    font-weight: 600 !important;
}

/* Pulse animation for empty required fields */
@keyframes pulse-border {
    0% { border-color: var(--primary-color); }
    50% { border-color: #ffc107; }
    100% { border-color: var(--primary-color); }
}

.reminder-setup .form-select[value=""]:focus,
.form-select[value=""]:focus {
    animation: pulse-border 2s ease-in-out infinite !important;
}

/* Override Bootstrap card styles */
.reminder-setup .card,
.card {
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    font-family: var(--primary-font) !important;
}

.reminder-setup .card-body,
.card-body {
    font-family: var(--primary-font) !important;
    padding: 1rem !important;
}

/* Override Bootstrap button styles */
.reminder-setup .btn-success,
.btn-success {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    font-family: var(--primary-font) !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.reminder-setup .btn-success:hover,
.btn-success:hover,
.reminder-setup .btn-success:focus,
.btn-success:focus,
.reminder-setup .btn-success:active,
.btn-success:active {
    background-color: #018c9a !important;
    border-color: #018c9a !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(1, 162, 180, 0.2) !important;
}

.reminder-setup .btn-outline-secondary,
.btn-outline-secondary {
    font-family: var(--primary-font) !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.reminder-setup .btn-outline-secondary:hover,
.btn-outline-secondary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2) !important;
}

/* Override Bootstrap alert styles */
.reminder-setup .alert,
.alert {
    border-radius: 12px !important;
    font-family: var(--primary-font) !important;
}

/* Override Bootstrap text utilities */
.reminder-setup .text-primary,
.text-primary {
    color: var(--primary-color) !important;
}

.reminder-setup .text-muted,
.text-muted {
    font-family: var(--primary-font) !important;
}

/* Override Bootstrap heading styles */
.reminder-setup h1,
.reminder-setup h2,
.reminder-setup h3,
.reminder-setup h4,
.reminder-setup h5,
.reminder-setup h6,
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font) !important;
    color: var(--text-color) !important;
}

/* Override Bootstrap form control styles */
.reminder-setup .form-control,
.form-control {
    border: 1px solid var(--border-color) !important;
    border-radius: 6px !important;
    font-family: var(--primary-font) !important;
}

.reminder-setup .form-control:focus,
.form-control:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(1, 162, 180, 0.25) !important;
}

/* Style the timezone select when it has a value */
#timezone.has-value {
    background-color: rgba(40, 167, 69, 0.1) !important;
    border-color: #28a745 !important;
}

/* Override Bootstrap form check styles */
.reminder-setup .form-check-input,
.form-check-input {
    border: 1px solid #6c757d !important;
}

.reminder-setup .form-check-input:hover,
.form-check-input:hover {
    border-color: var(--primary-color) !important;
    cursor: pointer !important;
}

.reminder-setup .form-check-label,
.form-check-label {
    font-family: var(--primary-font) !important;
    font-size: 14px !important;
}

.reminder-setup .form-check-label:hover,
.form-check-label:hover {
    color: var(--primary-color) !important;
    cursor: pointer !important;
}

/* Ensure reminder content uses our fonts (but don't override navbar) */
.reminder-setup-container {
    font-family: var(--primary-font);
}



@media (max-width: 600px) {
    .datetime-input .form-control {
        font-size: 16px;
        padding: 0.75rem;
    }

    .reminder-options-container {
        padding: 0.75rem;
    }

    .reminder-options-container .card-body {
        padding: 0.75rem;
    }

    #autoDetectButton {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        white-space: normal;
        text-align: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .reminder-option-row {
        gap: 0.5rem;
    }

    .form-check.form-switch .form-check-label {
        font-size: 0.95rem;
    }
}