/* ==========================================================================
   Study Time Planner Calculator - Local Styles

   Calculator-specific styles only. Base styles are in /shared/css/base.css
   ========================================================================== */

/* ==========================================================================
   Form Styling
   ========================================================================== */

/* Form label styling */
.form-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

/* Form input styling */
.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    transition: all 0.2s;
    color: #333;
}

.form-input:hover {
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.form-input:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

/* Select dropdown styling */
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003049' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.form-select:hover {
    border-color: #003049;
    background-color: #f8fafc;
}

.form-select:focus {
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
    outline: none;
}

/* ==========================================================================
   Date Input Styling
   ========================================================================== */

input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 44px;
    font-size: 16px;
    color: #333;
    width: 100%;
    position: relative;
    display: block;
}

input[type="date"]:not(:focus):not(:valid) {
    color: #666;
}

input[type="date"]:not(:focus):not(:valid)::before {
    content: attr(placeholder);
    color: #666;
    width: 100%;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    position: absolute;
    right: 8px;
    height: 20px;
    width: 20px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

input[type="date"]:focus {
    outline: none;
    border-color: #003049;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

/* ==========================================================================
   Warning Message
   ========================================================================== */

.warning-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    margin-bottom: 16px;
}

.warning-message.hidden {
    display: none;
}

.warning-icon {
    flex-shrink: 0;
    color: #d97706;
}

.warning-content {
    flex: 1;
}

.warning-content strong {
    display: block;
    color: #92400e;
    margin-bottom: 4px;
}

.warning-content p {
    color: #92400e;
    font-size: 14px;
    margin: 0;
}

.warning-message.critical {
    background-color: #fee2e2;
    border-color: #ef4444;
}

.warning-message.critical .warning-icon {
    color: #dc2626;
}

.warning-message.critical .warning-content strong,
.warning-message.critical .warning-content p {
    color: #991b1b;
}

/* ==========================================================================
   Main Result Display
   ========================================================================== */

.result-main {
    text-align: center;
    padding: 20px;
    margin-bottom: 16px;
    background: linear-gradient(to bottom right, #f0f9ff, #e0f2fe);
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.result-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.result-item-large {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-label {
    font-size: 16px;
    color: #003049;
    font-weight: 500;
}

.result-value-large {
    font-size: 36px;
    font-weight: 700;
    color: #003049;
}

/* ==========================================================================
   Results Grid and Sections
   ========================================================================== */

.results-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.results-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.results-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #003049;
    margin-bottom: 12px;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.results-item {
    color: #003049;
    font-size: 15px;
}

.results-value {
    font-weight: 600;
    color: #003049;
}

/* ==========================================================================
   Schedule Container
   ========================================================================== */

.schedule-container {
    background: #f9fafb;
    border-radius: 8px;
    padding: 16px;
}

.schedule-day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.schedule-day:last-child {
    border-bottom: none;
}

.schedule-day-name {
    font-weight: 500;
    color: #003049;
}

.schedule-day-hours {
    font-weight: 600;
    color: #003049;
    background: #e0f2fe;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 14px;
}

.schedule-summary {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid #bae6fd;
    text-align: center;
    color: #003049;
    font-weight: 500;
}

/* ==========================================================================
   Pomodoro Section
   ========================================================================== */

.pomodoro-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f0f9ff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.pomodoro-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pomodoro-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 50%;
    color: #003049;
    flex-shrink: 0;
}

.pomodoro-text {
    color: #003049;
    font-size: 15px;
}

.pomodoro-text strong {
    color: #003049;
}

.pomodoro-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pomodoro-summary p {
    margin: 0;
    color: #003049;
    font-size: 15px;
}

/* ==========================================================================
   Tips Section
   ========================================================================== */

.tips-section {
    background: #f0fdf4;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #86efac;
}

.tips-list {
    margin: 0;
    padding-left: 20px;
}

.tips-list li {
    color: #166534;
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */

.faq-section {
    margin-top: 32px;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
    color: #003049;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
    text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 640px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .result-value-large {
        font-size: 28px;
    }

    .pomodoro-summary {
        grid-template-columns: 1fr;
    }

    .schedule-day {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .faq-section {
        padding: 16px;
        margin-top: 24px;
    }

    .faq-section h2 {
        font-size: 20px;
        margin-bottom: 16px;
    }

    input[type="date"] {
        background-color: #ffffff;
        border: 1px solid #ddd;
    }

    input[type="date"]::-webkit-datetime-edit-text,
    input[type="date"]::-webkit-datetime-edit-month-field,
    input[type="date"]::-webkit-datetime-edit-day-field,
    input[type="date"]::-webkit-datetime-edit-year-field {
        color: #333;
    }
}

@media (max-width: 380px) {
    .result-main {
        padding: 16px;
    }

    .result-value-large {
        font-size: 24px;
    }

    .pomodoro-info {
        padding: 12px;
    }

    .pomodoro-icon {
        width: 32px;
        height: 32px;
    }

    .tips-section {
        padding: 12px;
    }
}
