/* Fastr Finance Widget Styles */

.fastr-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 20px auto;
}

/* Layout-specific widths */
.fastr-widget:has(.fastr-layout-card) {
    max-width: 450px;
}

.fastr-widget:has(.fastr-layout-banner) {
    max-width: 100%;
}

.fastr-widget:has(.fastr-layout-mini) {
    max-width: 300px;
}

.fastr-widget:has(.fastr-layout-inline) {
    max-width: 500px;
}

.fastr-widget-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fastr-widget-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.fastr-widget-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fastr-widget-logo img {
    max-width: 150px;
    height: auto;
}

.fastr-widget-content {
    padding: 30px;
}

.fastr-widget-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.fastr-widget-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin: 20px 0;
    gap: 8px;
}

.fastr-price-label {
    font-size: 16px;
    opacity: 0.8;
}

.fastr-price-amount {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
}

.fastr-price-period {
    font-size: 18px;
    opacity: 0.8;
}

.fastr-widget-description {
    font-size: 16px;
    line-height: 1.6;
    margin: 20px 0;
    opacity: 0.9;
}

.fastr-widget-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.fastr-btn {
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
}

.fastr-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.fastr-btn:active {
    transform: translateY(0);
}

.fastr-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.fastr-btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
}

.fastr-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.fastr-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Theme: Dark */
.fastr-theme-dark .fastr-widget-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
}

.fastr-theme-dark .fastr-widget-logo {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.fastr-theme-dark .fastr-btn-secondary {
    color: #ffffff;
}

/* Theme: Light */
.fastr-theme-light .fastr-widget-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
    color: #2c3e50;
}

.fastr-theme-light .fastr-widget-logo {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.fastr-theme-light .fastr-btn-secondary {
    color: #2c3e50;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

.fastr-theme-light .fastr-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.3);
}

/* Theme: Red */
.fastr-theme-red .fastr-widget-card {
    background: linear-gradient(135deg, #2c1810 0%, #4a1f1f 100%);
    color: #ffffff;
}

.fastr-theme-red .fastr-widget-logo {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.fastr-theme-red .fastr-btn-primary {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

.fastr-theme-red .fastr-btn-primary:hover {
    background: linear-gradient(135deg, #a93226 0%, #cb4335 100%);
}

.fastr-theme-red .fastr-btn-secondary {
    color: #ffffff;
}

/* Modal Styles */
.fastr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.fastr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.fastr-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.fastr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
}

.fastr-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.fastr-modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 30px 0;
    color: #2c3e50;
}

/* Form Styles */
.fastr-quote-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.fastr-form-group {
    display: flex;
    flex-direction: column;
}

.fastr-form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

.fastr-form-group input,
.fastr-form-group textarea {
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.fastr-form-group input:focus,
.fastr-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.fastr-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.fastr-btn-submit {
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.fastr-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.fastr-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.fastr-form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
}

.fastr-form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fastr-form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 600px) {
    .fastr-widget {
        margin: 10px;
    }

    .fastr-widget-content {
        padding: 20px;
    }

    .fastr-price-amount {
        font-size: 36px;
    }

    .fastr-widget-title {
        font-size: 20px;
    }

    .fastr-modal-content {
        padding: 30px 20px;
    }

    .fastr-modal-title {
        font-size: 24px;
    }
}

/* Smooth animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes fadeInOverlay {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fastr-modal[style*="display: block"] .fastr-modal-content {
    animation: fadeIn 0.3s ease;
}

.fastr-modal[style*="display: block"] .fastr-modal-overlay {
    animation: fadeInOverlay 0.3s ease;
}


/* Layout: Banner */
.fastr-layout-banner .fastr-widget-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px 40px;
}

.fastr-banner-left {
    flex: 1;
}

.fastr-banner-center {
    flex: 0 0 auto;
    text-align: center;
}

.fastr-banner-right {
    flex: 0 0 auto;
}

.fastr-layout-banner .fastr-widget-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.fastr-layout-banner .fastr-widget-description {
    margin: 0;
    font-size: 16px;
}

.fastr-layout-banner .fastr-repayment-amount {
    font-size: 42px;
}

.fastr-layout-banner .fastr-widget-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
}

/* Layout: Mini */
.fastr-layout-mini .fastr-widget-content {
    padding: 20px;
}

.fastr-layout-mini .fastr-widget-logo-mini {
    text-align: center;
    margin-bottom: 15px;
}

.fastr-layout-mini .fastr-widget-logo-mini img {
    max-width: 100px;
    height: auto;
}

.fastr-layout-mini .fastr-widget-price-compact {
    text-align: center;
    margin-bottom: 15px;
}

.fastr-layout-mini .fastr-price-amount {
    font-size: 32px;
    font-weight: 800;
    display: block;
}

.fastr-layout-mini .fastr-price-period {
    font-size: 14px;
    opacity: 0.8;
}

.fastr-layout-mini .fastr-widget-title-mini {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 15px 0;
}

.fastr-layout-mini .fastr-btn-block {
    width: 100%;
    margin-bottom: 8px;
}

/* Layout: Inline */
.fastr-layout-inline .fastr-widget-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    gap: 20px;
}

.fastr-inline-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.fastr-logo-inline {
    max-width: 80px;
    height: auto;
}

.fastr-inline-text {
    display: flex;
    flex-direction: column;
}

.fastr-widget-title-inline {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.fastr-price-inline {
    font-size: 24px;
    font-weight: 800;
}

.fastr-inline-right {
    display: flex;
    gap: 10px;
}

/* Form Styles */
.fastr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.fastr-form-simple .fastr-form-group {
    margin-bottom: 15px;
}

.fastr-form-detailed .fastr-form-group {
    margin-bottom: 18px;
}

.fastr-form-detailed select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
}

.fastr-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.fastr-checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.fastr-form-disclaimer {
    margin-top: 15px;
    text-align: center;
    color: #646970;
}

/* Responsive Layouts */
@media (max-width: 900px) {
    .fastr-layout-banner .fastr-widget-content {
        flex-direction: column;
        text-align: center;
    }

    .fastr-banner-left,
    .fastr-banner-center,
    .fastr-banner-right {
        width: 100%;
    }

    .fastr-layout-banner .fastr-widget-actions {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 600px) {
    .fastr-layout-inline .fastr-widget-content {
        flex-direction: column;
        text-align: center;
    }

    .fastr-inline-left {
        flex-direction: column;
        text-align: center;
    }

    .fastr-inline-right {
        width: 100%;
        flex-direction: column;
    }

    .fastr-form-row {
        grid-template-columns: 1fr;
    }
}