/* function.css - Function calculator page styles */

/* Page header */
.function-container {
    max-width: 100%;
}

.function-container > h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a3154;
    margin-bottom: 0.15rem;
    letter-spacing: -0.3px;
}

.function-container > .subtitle {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

/* Card styling */
.function-input-card,
.function-output-card {
    height: 100%;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 2px 12px rgba(26, 49, 84, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(32,68,104,0.05) 0%, rgba(255,255,255,0) 100%) !important;
}

.function-input-card:hover,
.function-output-card:hover {
    box-shadow: 0 6px 20px rgba(26, 49, 84, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.function-input-card > .card-header,
.function-output-card > .card-header {
    background: linear-gradient(135deg, #2c4a7c 0%, #1a3154 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
    letter-spacing: 0.3px;
    border-bottom: none;
    text-align: center;
}

.function-input-card > .card-body,
.function-output-card > .card-body {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(59,89,152,0.03) 0%, rgba(255,255,255,0) 100%);
}

.function-input-card > .card-footer,
.function-output-card > .card-footer {
    background: #fafbfc;
    border-top: 1px solid #eef1f5;
    padding: 0.75rem 1.25rem;
}

/* Form controls */
.func-control {
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
    border-radius: 8px !important;
    border: 1.5px solid #dee2e6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #fff;
}

.func-control:focus {
    border-color: #2c4a7c;
    box-shadow: 0 0 0 3px rgba(44, 74, 124, 0.12);
    outline: none;
}

.func-control:hover:not(:focus):not([readonly]):not(:disabled) {
    border-color: #adb5bd;
}

.func-control[readonly] {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    color: #495057;
    cursor: default;
}

.func-control:disabled {
    background-color: #f0f2f5;
    border-color: #e0e3e7;
    color: #8c939d;
    cursor: not-allowed;
}

/* Button separator */
.function-input-card .button-section {
    padding-top: 0.75rem;
    margin-top: 0.75rem;
    border-top: 1px solid #eef1f5;
}

/* Disclaimer section */
.function-disclaimer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    font-size: 0.8rem;
    font-style: italic;
    color: #6c757d;
    line-height: 1.6;
    max-width: 70ch;
}

.function-disclaimer a {
    color: #2c4a7c;
}

/* Resources section */
.function-resources {
    margin-top: 1.25rem;
}

.function-resources h6 {
    color: #1a3154;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.function-resources a {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: #2c4a7c;
    font-size: 0.875rem;
}

.function-resources a:hover {
    color: #1a3154;
}

/* Description section (dynamic HTML from model) */
.function-description {
    margin-top: 1.5rem;
    line-height: 1.7;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .function-input-card > .card-body,
    .function-output-card > .card-body {
        padding: 0.875rem;
    }

    .func-control {
        font-size: 0.8rem;
        padding: 0.3rem 0.5rem;
    }
}
