/**
 * FSBO 1031 Exchange Calculator Styles
 * Version: 1.0.0
 */

/* Reset and Base Styles */
.fsbo-1031-calculator-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    margin: 2rem auto;
    max-width: 900px;
}

.fsbo-1031-calculator-wrapper * {
    box-sizing: border-box;
}

/* Container */
.fsbo-1031-calculator-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 2.5rem;
    border: 1px solid #e0e0e0;
}

/* Header */
.fsbo-1031-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.fsbo-1031-icon {
    width: 36px;
    height: 36px;
    color: #2C5F8D;
    flex-shrink: 0;
}

.fsbo-1031-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2C5F8D;
    line-height: 1.2;
}

/* Info Section */
.fsbo-1031-info {
    background: #f8f9fa;
    border-left: 4px solid #4A90C8;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 4px;
}

.fsbo-1031-info p {
    margin: 0;
    font-size: 15px;
    color: #555;
}

/* Input Section */
.fsbo-1031-input-section {
    margin-bottom: 2rem;
}

.fsbo-1031-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.fsbo-1031-label .required {
    color: #e74c3c;
}

.fsbo-1031-date-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #333;
    font-family: inherit;
}

.fsbo-1031-date-input:focus {
    outline: none;
    border-color: #4A90C8;
    box-shadow: 0 0 0 3px rgba(74, 144, 200, 0.1);
}

.fsbo-1031-date-input:hover {
    border-color: #b0b0b0;
}

/* Calculate Button */
.fsbo-1031-calculate-btn {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #2C5F8D 0%, #4A90C8 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(44, 95, 141, 0.2);
}

.fsbo-1031-calculate-btn:hover {
    background: linear-gradient(135deg, #234a6f 0%, #3a7aad 100%);
    box-shadow: 0 4px 8px rgba(44, 95, 141, 0.3);
    transform: translateY(-1px);
}

.fsbo-1031-calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(44, 95, 141, 0.2);
}

.fsbo-1031-calculate-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* Error Message */
.fsbo-1031-error {
    background: #fee;
    border: 1px solid #fcc;
    border-left: 4px solid #e74c3c;
    color: #c33;
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 15px;
}

/* Results Section */
.fsbo-1031-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Cards */
.fsbo-1031-result-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.75rem;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.fsbo-1031-result-card:hover {
    border-color: #4A90C8;
    box-shadow: 0 4px 12px rgba(44, 95, 141, 0.15);
    transform: translateY(-2px);
}

.fsbo-1031-card-45 {
    border-top: 4px solid #4A90C8;
}

.fsbo-1031-card-180 {
    border-top: 4px solid #27AE60;
}

.fsbo-1031-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.fsbo-1031-card-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.fsbo-1031-card-45 .fsbo-1031-card-icon {
    color: #4A90C8;
}

.fsbo-1031-card-180 .fsbo-1031-card-icon {
    color: #27AE60;
}

.fsbo-1031-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.fsbo-1031-card-body {
    padding-top: 0.5rem;
}

.fsbo-1031-date-display {
    font-size: 22px;
    font-weight: 700;
    color: #2C5F8D;
    margin-bottom: 1rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e0e0e0;
}

.fsbo-1031-description {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.fsbo-1031-description strong {
    color: #333;
    font-weight: 600;
}

/* Footer Info */
.fsbo-1031-footer-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #fffbf0;
    padding: 1.25rem;
    border-radius: 6px;
    border-left: 4px solid #f39c12;
}

.fsbo-1031-footer-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.fsbo-1031-footer-info strong {
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fsbo-1031-calculator-container {
        padding: 1.75rem;
    }

    .fsbo-1031-title {
        font-size: 20px;
    }

    .fsbo-1031-icon {
        width: 30px;
        height: 30px;
    }

    .fsbo-1031-results {
        grid-template-columns: 1fr;
    }

    .fsbo-1031-date-display {
        font-size: 20px;
    }

    .fsbo-1031-calculate-btn {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .fsbo-1031-calculator-container {
        padding: 1.25rem;
    }

    .fsbo-1031-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .fsbo-1031-title {
        font-size: 18px;
    }

    .fsbo-1031-result-card {
        padding: 1.25rem;
    }

    .fsbo-1031-card-header h3 {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .fsbo-1031-calculator-container {
        box-shadow: none;
        border: 1px solid #000;
    }

    .fsbo-1031-input-section,
    .fsbo-1031-calculate-btn {
        display: none;
    }

    .fsbo-1031-results {
        display: block;
    }

    .fsbo-1031-result-card {
        page-break-inside: avoid;
        margin-bottom: 1rem;
        border: 1px solid #000;
    }
}
