/* Calculator Specific Styles */

.trade-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.trade-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand);
    transform: translateX(4px);
}

.trade-btn.active {
    background: linear-gradient(135deg, rgba(187, 166, 255, 0.2) 0%, rgba(121, 195, 255, 0.2) 100%);
    border-color: var(--brand);
    font-weight: 600;
}

.calc-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.calc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.2s;
}

.calc-input:focus {
    outline: none;
    border-color: var(--brand);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(187, 166, 255, 0.1);
}

.calc-input::placeholder {
    color: var(--muted);
    opacity: 0.6;
}

.calc-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
    cursor: pointer;
}

.calc-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
}

.calc-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(187, 166, 255, 0.3);
}

.calc-button:active {
    transform: translateY(0);
}

.calc-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive design */
@media (max-width: 1024px) {
    main > div {
        grid-template-columns: 1fr !important;
    }

    aside {
        position: static !important;
    }

    .trade-btn {
        font-size: 0.8125rem;
        padding: 0.625rem 0.875rem;
    }
}

@media (max-width: 768px) {
    .calc-input {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }

    .calc-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }
}

/* Animation for results */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#results-container {
    animation: slideIn 0.3s ease-out;
}

/* Number input styling */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
}

/* Select dropdown styling */
select.calc-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a7adbd' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    appearance: none;
}

select.calc-input option {
    background: var(--panel);
    color: var(--text);
}

/* Checkbox styling */
input[type="checkbox"].calc-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

input[type="checkbox"].calc-checkbox:checked {
    background: var(--brand);
    border-color: var(--brand);
}

input[type="checkbox"].calc-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

input[type="checkbox"].calc-checkbox:hover {
    border-color: var(--brand);
}

/* Grid improvements */
.calc-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.calc-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.calc-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 768px) {
    .calc-grid-2,
    .calc-grid-3,
    .calc-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Loading state */
.calc-button.loading {
    position: relative;
    color: transparent;
}

.calc-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error state */
.calc-input.error {
    border-color: var(--danger);
    background: rgba(255, 107, 107, 0.1);
}

.calc-error-message {
    color: var(--danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Success highlight */
.calc-result-highlight {
    animation: highlight 0.5s ease-out;
}

@keyframes highlight {
    0% {
        background: rgba(187, 166, 255, 0.3);
    }
    100% {
        background: transparent;
    }
}

/* SEO Content Sections */
#seo-content-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text);
}

#seo-content-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text);
}

#seo-content-section p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1rem;
}

#seo-content-section strong {
    color: var(--text);
    font-weight: 600;
}

/* Pricing Grid Responsive */
@media (max-width: 640px) {
    #pricing-summary > div {
        grid-template-columns: 1fr !important;
    }
}

/* FAQ Accordion */
#faq-container button {
    transition: all 0.2s;
}

#faq-container button:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Mobile optimization for SEO content */
@media (max-width: 768px) {
    #seo-content-section h2 {
        font-size: 1.5rem;
    }

    #seo-content-section h3 {
        font-size: 1.125rem;
    }

    #pricing-summary,
    #description-section,
    #faq-section {
        padding: 1.5rem !important;
    }
}
