/**
 * Borrowly Loan Application Styles
 * Custom CSS for loan application forms
 */

/* ===================================
   Amount Selection Form (Shortcode)
   =================================== */

.borrowly-amount-form-wrapper {
    margin: 2rem 0;
    padding: 0;
}

.borrowly-amount-form-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.borrowly-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.borrowly-form-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0 0 2rem 0;
    text-align: center;
}

.borrowly-error-message {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.borrowly-amount-submitted {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    max-width: 500px;
    margin: 2rem auto;
}

.borrowly-amount-submitted a {
    color: #15803d;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid #15803d;
}

.borrowly-amount-submitted a:hover {
    color: #166534;
    border-bottom-color: #166534;
}

/* Honeypot - hide from real users */
.borrowly-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.borrowly-form-group {
    margin-bottom: 1.5rem;
}

.borrowly-label {
    display: block;
    width: 100%;
}

.borrowly-label-text {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.borrowly-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #1e293b;
    min-height: 48px;
    transition: border-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.borrowly-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.borrowly-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #3b82f6;
    border: none;
    border-radius: 8px;
    min-height: 48px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.borrowly-submit-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.borrowly-submit-btn:active {
    transform: translateY(0);
}

.borrowly-form-disclaimer {
    font-size: 0.85rem;
    color: #64748b;
    margin: 1rem 0 0 0;
    text-align: center;
    line-height: 1.5;
}

/* ===================================
   Loan Application Page Template
   =================================== */

.borrowly-access-denied {
    padding: 3rem 1.5rem;
    text-align: center;
}

.borrowly-access-denied-content {
    max-width: 600px;
    margin: 0 auto;
}

.borrowly-access-denied h1 {
    font-size: 2rem;
    color: #0f172a;
    margin-bottom: 1rem;
}

.borrowly-inline-amount-form {
    margin: 2.5rem 0;
}

.borrowly-help-text {
    color: #64748b;
    font-size: 1rem;
}

.borrowly-help-text a {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px solid #3b82f6;
}

.borrowly-help-text a:hover {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.borrowly-application-page {
    padding: 2rem 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.borrowly-application-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.borrowly-application-header h1 {
    font-size: 2.25rem;
    color: #0f172a;
    margin-bottom: 1rem;
    font-weight: 700;
}

.borrowly-application-subtitle {
    font-size: 1.125rem;
    color: #475569;
    margin-bottom: 0.75rem;
}

.borrowly-application-subtitle strong {
    color: #3b82f6;
    font-weight: 700;
}

.borrowly-change-amount {
    margin-top: 1rem;
}

.borrowly-change-amount a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.borrowly-change-amount a:hover {
    color: #3b82f6;
}

/* Form Card Container */
.borrowly-form-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.borrowly-iframe-container {
    position: relative;
    min-height: 600px;
}

/* Loading Overlay */
.borrowly-loading-overlay {
    position: absolute;
    inset: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.borrowly-loading-content {
    text-align: center;
}

.borrowly-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e2e8f0;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: borrowly-spin 0.8s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes borrowly-spin {
    to {
        transform: rotate(360deg);
    }
}

.borrowly-loading-text {
    color: #64748b;
    font-size: 1rem;
}

.borrowly-iframe-wrapper {
    width: 100%;
    padding: 1.5rem;
}

/* Footer */
.borrowly-application-footer {
    text-align: center;
    padding: 2rem 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
}

.borrowly-security-note {
    font-size: 1rem;
    color: #15803d;
    margin-bottom: 1rem;
    font-weight: 500;
}

.borrowly-disclaimer {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.borrowly-disclaimer a {
    color: #3b82f6;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.borrowly-disclaimer a:hover {
    border-bottom-color: #3b82f6;
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
    .borrowly-amount-form-container {
        padding: 2rem 1.5rem;
    }

    .borrowly-form-title {
        font-size: 1.5rem;
    }

    .borrowly-application-header h1 {
        font-size: 1.75rem;
    }

    .borrowly-application-subtitle {
        font-size: 1rem;
    }

    .borrowly-application-page {
        padding: 1.5rem 1rem;
    }

    .borrowly-iframe-wrapper {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .borrowly-amount-form-container {
        padding: 1.5rem 1rem;
        border-radius: 8px;
    }

    .borrowly-form-title {
        font-size: 1.25rem;
    }

    .borrowly-select,
    .borrowly-submit-btn {
        font-size: 15px;
    }

    .borrowly-application-header h1 {
        font-size: 1.5rem;
    }
}

/* ===================================
   Feature Boxes
   =================================== */

.borrowly-features-wrapper {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
}

/* Grid Layout - Default 3 columns */
.borrowly-features-wrapper.borrowly-features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.borrowly-features-wrapper.borrowly-features-cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.borrowly-features-wrapper.borrowly-features-cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.borrowly-features-wrapper.borrowly-features-cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* List Layout - Single column */
.borrowly-features-wrapper.borrowly-features-list {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.borrowly-feature-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.borrowly-feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

.borrowly-feature-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1rem;
}

.borrowly-feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
}

.borrowly-feature-description {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.borrowly-features-disclaimer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.borrowly-features-disclaimer p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.borrowly-features-disclaimer strong {
    color: #0f172a;
}

/* List style variations */
.borrowly-features-wrapper.borrowly-features-list .borrowly-feature-box {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    text-align: left;
    align-items: start;
}

.borrowly-features-wrapper.borrowly-features-list .borrowly-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 0;
}

.borrowly-features-wrapper.borrowly-features-list .borrowly-feature-content {
    min-width: 0;
}

/* Tablet adjustments */
@media (max-width: 768px) {
    .borrowly-features-wrapper {
        gap: 1.25rem;
    }

    .borrowly-feature-box {
        padding: 1.5rem;
    }

    .borrowly-feature-icon {
        font-size: 2.5rem;
    }

    .borrowly-feature-title {
        font-size: 1.125rem;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .borrowly-features-wrapper.borrowly-features-grid {
        grid-template-columns: 1fr;
    }

    .borrowly-feature-box {
        padding: 1.25rem;
    }

    .borrowly-features-wrapper.borrowly-features-list .borrowly-feature-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .borrowly-features-wrapper.borrowly-features-list .borrowly-feature-icon {
        margin-bottom: 1rem;
    }
}

/* ===================================
   Representative Example Box
   =================================== */

.borrowly-rep-example {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.borrowly-rep-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
    text-align: center;
}

.borrowly-rep-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0 0 1.5rem 0;
    text-align: center;
    font-style: italic;
}

.borrowly-rep-scenario {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.borrowly-rep-main {
    font-size: 1rem;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
}

.borrowly-rep-main strong {
    color: #3b82f6;
    font-weight: 700;
}

.borrowly-rep-payment {
    font-size: 1.125rem;
    color: #0f172a;
    margin: 0;
    font-weight: 600;
}

.borrowly-rep-payment strong {
    color: #3b82f6;
    font-size: 1.5rem;
}

.borrowly-rep-totals {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.borrowly-rep-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.borrowly-rep-item:last-child {
    border-bottom: none;
}

.borrowly-rep-label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

.borrowly-rep-value {
    font-size: 1.125rem;
    color: #0f172a;
    font-weight: 700;
}

.borrowly-rep-disclaimer {
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.6;
    margin: 0;
    text-align: center;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .borrowly-rep-example {
        padding: 1.5rem;
    }

    .borrowly-rep-title {
        font-size: 1.25rem;
    }

    .borrowly-rep-payment strong {
        font-size: 1.25rem;
    }

    .borrowly-rep-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .borrowly-rep-value {
        font-size: 1rem;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .borrowly-change-amount,
    .borrowly-loading-overlay {
        display: none !important;
    }
}
