/**
 * Public Styles for TFV Calculator Integration
 *
 * @package TFV_Calculator
 */

/* Calculator Wrapper */
.tfv-calculator-wrapper {
    position: relative;
    width: 100%;
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tfv-calculator-iframe {
    display: block;
    width: 100%;
    border: none;
    background: #fff;
    transition: opacity 0.3s ease;
}

.tfv-calculator-iframe.loading {
    opacity: 0.5;
}

/* Loading Indicator */
.tfv-calculator-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.tfv-calculator-loading .tfv-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: tfv-spin 1s linear infinite;
}

@keyframes tfv-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Login Prompt */
.tfv-login-prompt {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 40px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    max-width: 600px;
}

.tfv-login-prompt h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.tfv-login-prompt p {
    margin: 0 0 30px 0;
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.6;
}

.tfv-login-prompt .tfv-button {
    display: inline-block;
    padding: 14px 40px;
    background: #fff;
    color: #667eea;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tfv-login-prompt .tfv-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #764ba2;
}

/* Upgrade Prompt */
.tfv-upgrade-prompt {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 60px 40px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    max-width: 600px;
}

.tfv-upgrade-prompt h3 {
    margin: 0 0 15px 0;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.tfv-upgrade-prompt p {
    margin: 0 0 10px 0;
    font-size: 16px;
    opacity: 0.95;
    line-height: 1.6;
}

.tfv-upgrade-prompt .tfv-pricing {
    font-size: 32px;
    font-weight: 700;
    margin: 20px 0;
    color: #fff;
}

.tfv-upgrade-prompt .tfv-upgrade-button {
    display: inline-block;
    padding: 14px 40px;
    background: #fff;
    color: #f5576c;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-top: 10px;
}

.tfv-upgrade-prompt .tfv-upgrade-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #fff;
    color: #f093fb;
}

/* Feature Highlights */
.tfv-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tfv-feature {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    text-align: left;
}

.tfv-feature h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.tfv-feature p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Error Messages */
.tfv-error-message {
    background: #fff;
    border-left: 4px solid #d63638;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tfv-error-message h3 {
    margin: 0 0 10px 0;
    color: #d63638;
    font-size: 18px;
}

.tfv-error-message p {
    margin: 0;
    color: #50575e;
    line-height: 1.6;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .tfv-login-prompt,
    .tfv-upgrade-prompt {
        padding: 40px 25px;
        margin: 15px;
    }

    .tfv-login-prompt h3,
    .tfv-upgrade-prompt h3 {
        font-size: 24px;
    }

    .tfv-login-prompt p,
    .tfv-upgrade-prompt p {
        font-size: 14px;
    }

    .tfv-upgrade-prompt .tfv-pricing {
        font-size: 28px;
    }

    .tfv-features {
        grid-template-columns: 1fr;
    }

    .tfv-calculator-wrapper {
        margin: 15px 0;
    }
}

@media screen and (max-width: 480px) {
    .tfv-login-prompt,
    .tfv-upgrade-prompt {
        padding: 30px 20px;
    }

    .tfv-login-prompt .tfv-button,
    .tfv-upgrade-prompt .tfv-upgrade-button {
        padding: 12px 30px;
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .tfv-calculator-wrapper {
        box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    }

    .tfv-error-message {
        background: #1d2327;
        color: #f0f0f1;
    }

    .tfv-error-message h3 {
        color: #ff6b6b;
    }

    .tfv-error-message p {
        color: #d0d0d0;
    }
}

/* Accessibility */
.tfv-button:focus,
.tfv-upgrade-button:focus {
    outline: 3px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .tfv-login-prompt,
    .tfv-upgrade-prompt {
        display: none;
    }

    .tfv-calculator-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Animation Classes */
.tfv-fade-in {
    animation: tfv-fadeIn 0.5s ease-in;
}

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

.tfv-slide-up {
    animation: tfv-slideUp 0.5s ease-out;
}

@keyframes tfv-slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Calculator Type Badges */
.tfv-calculator-badge {
    display: inline-block;
    padding: 5px 12px;
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.tfv-calculator-badge.premium {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
}

.tfv-calculator-badge.professional {
    background: rgba(118, 75, 162, 0.2);
    color: #764ba2;
}

.tfv-calculator-badge.managed {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* Calculator Link Buttons */
.tfv-calculator-link-wrapper {
    margin: 20px 0;
}

.tfv-calculator-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    color: #333;
    font-weight: 500;
    gap: 15px;
}

.tfv-calculator-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.tfv-calc-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.tfv-calc-name {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.tfv-calc-arrow {
    font-size: 24px;
    font-weight: 300;
    color: #3498db;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.tfv-calculator-button:hover .tfv-calc-arrow {
    transform: translateX(5px);
}

/* FREE Tier Button - TFV Brand Green */
.tfv-btn-free {
    border-color: #0FA35B;
    background: linear-gradient(135deg, #f0fdf7 0%, #e6f9f0 100%);
}

.tfv-btn-free:hover {
    border-color: #0d8a4d;
    background: linear-gradient(135deg, #e6f9f0 0%, #d1f4e0 100%);
}

.tfv-btn-free .tfv-calc-badge {
    background: #FDDE5D;
    color: #1a1a1a;
}

.tfv-btn-free .tfv-calc-arrow {
    color: #FDDE5D;
}

/* PREMIUM Tier Button - TFV Brand Green */
.tfv-btn-premium {
    border-color: #0FA35B;
    background: linear-gradient(135deg, #f0fdf7 0%, #e6f9f0 100%);
}

.tfv-btn-premium:hover {
    border-color: #0d8a4d;
    background: linear-gradient(135deg, #e6f9f0 0%, #d1f4e0 100%);
}

.tfv-btn-premium .tfv-calc-badge {
    background: #FDDE5D;
    color: #1a1a1a;
}

.tfv-btn-premium .tfv-calc-arrow {
    color: #FDDE5D;
}

/* PROFESSIONAL Tier Button - TFV Brand Yellow */
.tfv-btn-professional {
    border-color: #FDDE5D;
    background: linear-gradient(135deg, #fffef0 0%, #fffae0 100%);
}

.tfv-btn-professional:hover {
    border-color: #e6c843;
    background: linear-gradient(135deg, #fffae0 0%, #fff5c7 100%);
}

.tfv-btn-professional .tfv-calc-badge {
    background: #0FA35B;
    color: #fff;
}

.tfv-btn-professional .tfv-calc-arrow {
    color: #0FA35B;
}

/* MANAGED Tier Button - TFV Brand Yellow */
.tfv-btn-managed {
    border-color: #FDDE5D;
    background: linear-gradient(135deg, #fffef0 0%, #fffae0 100%);
}

.tfv-btn-managed:hover {
    border-color: #e6c843;
    background: linear-gradient(135deg, #fffae0 0%, #fff5c7 100%);
}

.tfv-btn-managed .tfv-calc-badge {
    background: #0FA35B;
    color: #fff;
}

.tfv-btn-managed .tfv-calc-arrow {
    color: #0FA35B;
}

/* Responsive Design for Calculator Buttons */
@media screen and (max-width: 768px) {
    .tfv-calculator-button {
        padding: 18px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .tfv-calc-name {
        font-size: 15px;
    }

    .tfv-calc-arrow {
        align-self: flex-end;
        margin-top: -10px;
    }

    .tfv-calc-badge {
        font-size: 10px;
        padding: 5px 12px;
    }
}

@media screen and (max-width: 480px) {
    .tfv-calculator-button {
        padding: 15px;
    }

    .tfv-calc-name {
        font-size: 14px;
    }
}
