/* Lendingvalley - Loan Application Styles */

.dlc-application-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background: #ffffff;
    border: 2px solid #003366;
    border-radius: 8px;
    font-family: Arial, sans-serif;
}

.dlc-application-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #003366;
}

.dlc-logo img {
    max-height: 60px;
}

.dlc-form-title {
    color: #003366;
    font-size: 32px;
    font-weight: bold;
    margin: 0;
}

/* Form Sections */
.dlc-form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.dlc-section-title {
    color: #003366;
    font-size: 20px;
    font-weight: bold;
    margin: 0 0 20px 0;
    padding: 10px 15px;
    background: #003366;
    color: white;
    border-radius: 3px;
}




/* =============================================================
   Top Section – Application Type Selector
   ============================================================= */

.dlc-top-section {
    background: linear-gradient(135deg, #e8f0fe 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

/* Two-column card grid */
.dlc-application-type-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

/* Each card */
.dlc-check-card {
    display: block;
    cursor: pointer;
    border: 2px solid #c8d6e8;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.2s ease;
    overflow: hidden;
}

.dlc-check-card:hover {
    border-color: #003366;
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.12);
    transform: translateY(-1px);
}

/* Hide the native checkbox completely */
.dlc-check-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Card inner padding */
.dlc-check-card-inner {
    padding: 18px 20px;
}

/* Header row: icon + title */
.dlc-check-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

/* Custom checkbox icon */
.dlc-check-box-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    color: #94a3b8;
    transition: color 0.2s;
}

.dlc-check-box-icon svg {
    width: 26px;
    height: 26px;
}

/* The tick path inside the SVG - hidden by default */
.dlc-check-tick {
    opacity: 0;
    transition: opacity 0.15s;
}

/* Card title */
.dlc-check-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a5f;
    line-height: 1.2;
}

/* Card description text */
.dlc-check-card-text {
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

/* ── CHECKED STATE ────────────────────────────────────── */
.dlc-check-card input[type="checkbox"]:checked ~ .dlc-check-card-inner {
    /* nothing needed here - we use JS to add a class to the label */
}

/* Use JS-added class .is-checked on the label element */
.dlc-check-card.is-checked {
    border-color: #003366;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    box-shadow: 0 4px 14px rgba(0, 51, 102, 0.18);
}

.dlc-check-card.is-checked .dlc-check-box-icon {
    color: #003366;
}

.dlc-check-card.is-checked .dlc-check-tick {
    opacity: 1;
}

.dlc-check-card.is-checked .dlc-check-card-title {
    color: #003366;
}

.dlc-check-card.is-checked .dlc-check-card-text {
    color: #1e3a5f;
}

/* Selected badge strip at top of card */
.dlc-check-card.is-checked::before {
    content: '✓ Selected';
    display: block;
    background: #003366;
    color: white;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 14px;
    text-align: right;
}

/* Top fields grid */
.dlc-top-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 4px;
}

.dlc-top-fields .dlc-full-width {
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 600px) {
    .dlc-application-type-cards {
        grid-template-columns: 1fr;
    }
    .dlc-top-fields {
        grid-template-columns: 1fr;
    }
}

/* Form Rows and Fields */
.dlc-form-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-bottom: 15px;
}

.dlc-field-group {
    display: flex;
    flex-direction: column;
}

.dlc-field-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.dlc-field-group input[type="text"],
.dlc-field-group input[type="email"],
.dlc-field-group input[type="tel"],
.dlc-field-group input[type="date"],
.dlc-field-group textarea {
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.dlc-field-group input:focus,
.dlc-field-group textarea:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

/* Column Sizes */
.dlc-col-2 { grid-column: span 2; }
.dlc-col-3 { grid-column: span 3; }
.dlc-col-4 { grid-column: span 4; }
.dlc-col-6 { grid-column: span 6; }
.dlc-full-width { grid-column: 1 / -1; }



/* Flow Section */
.dlc-flow-section {
    background: #d5e8f0;
    border: 2px solid #003366;
}

.dlc-flow-section .dlc-section-title {
    background: #003366;
}

/* Owner Sections */
.dlc-owner-section {
    background: #fff8e1;
    border: 1px solid #fbc02d;
}

.dlc-owner-section .dlc-section-title {
    background: #fbc02d;
    color: #000;
}

/* Upload Section */
.dlc-upload-section {
    background: #f3e5f5;
    border: 1px solid #9c27b0;
}

.dlc-upload-section .dlc-section-title {
    background: #9c27b0;
}

.dlc-upload-description {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.dlc-field-group input[type="file"] {
    padding: 8px;
    border: 2px dashed #ced4da;
    border-radius: 4px;
    cursor: pointer;
    background: white;
}

.dlc-field-group input[type="file"]:hover {
    border-color: #003366;
}

.dlc-upload-status {
    margin-top: 8px;
    font-size: 13px;
}

.dlc-upload-status .uploading {
    color: #ff9800;
}

.dlc-upload-status .success {
    color: #4caf50;
    font-weight: 600;
}

.dlc-upload-status .error {
    color: #f44336;
}

/* Signature Section */
.dlc-signature-section {
    background: #e8f5e9;
    border: 1px solid #4caf50;
}

.dlc-signature-section .dlc-section-title {
    background: #4caf50;
}

.dlc-disclaimer {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.dlc-disclaimer p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #333;
}

.dlc-signature-pad-wrapper {
    position: relative;
}

.dlc-signature-pad {
    width: 100%;
    height: 150px;
    border: 2px solid #003366;
    border-radius: 4px;
    background: white;
    cursor: crosshair;
}

.dlc-clear-signature {
    margin-top: 10px;
    padding: 8px 16px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.dlc-clear-signature:hover {
    background: #d32f2f;
}

/* Submit Button */
.dlc-form-actions {
    text-align: center;
    margin-top: 40px;
}

.dlc-submit-btn {
    padding: 15px 50px;
    background: #003366;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 250px;
}

.dlc-submit-btn:hover:not(:disabled) {
    background: #004d99;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 51, 102, 0.3);
}

.dlc-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.dlc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Messages */
.dlc-message {
    padding: 30px;
    border-radius: 5px;
    text-align: center;
    margin-top: 30px;
}

.dlc-message h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
}

.dlc-message p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.dlc-success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.dlc-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

/* Required Field Indicator */
.required {
    color: #f44336;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dlc-application-wrapper {
        padding: 20px;
        margin: 20px auto;
    }
    
    .dlc-application-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .dlc-form-row {
        grid-template-columns: 1fr;
    }
    
    .dlc-col-2,
    .dlc-col-3,
    .dlc-col-4,
    .dlc-col-6 {
        grid-column: 1 / -1;
    }
    
    .dlc-top-fields {
        grid-template-columns: 1fr;
    }
    
    .dlc-form-title {
        font-size: 24px;
    }
    
    .dlc-section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .dlc-application-wrapper {
        padding: 15px;
        margin: 10px;
    }
    
    .dlc-form-section {
        padding: 15px;
    }
    
    .dlc-submit-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .dlc-application-wrapper {
        border: none;
        box-shadow: none;
    }
    
    .dlc-submit-btn,
    .dlc-clear-signature {
        display: none;
    }
}

/* =========================================================
   Dropbox Sign Mode – Info Boxes & Signing Panel
   ========================================================= */
.dlc-sign-info-box {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 6px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
}
.dlc-sign-email-notice    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a5f; }
.dlc-sign-embedded-notice { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.dlc-sign-icon { font-size: 26px; flex-shrink: 0; }

/* Embedded signing panel */
.dlc-signing {
    background: #eff6ff;
    border: 2px solid #2563eb;
    color: #1e3a5f;
    text-align: center;
}
.dlc-signing h3 { margin: 0 0 10px; font-size: 22px; }
.dlc-sign-buttons { display: inline-block; text-align: left; margin-top: 10px; }
.dlc-sign-row { display: flex; align-items: center; gap: 14px; }
.dlc-sign-action-btn {
    padding: 12px 28px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.dlc-sign-action-btn:hover { background: #1d4ed8; }

/* Admin signature status table */
.dlc-sig-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.dlc-sig-table th, .dlc-sig-table td { padding: 8px 10px; border: 1px solid #ddd; font-size: 13px; }
.dlc-sig-table th { background: #003366; color: #fff; }
.dlc-complete { color: #16a34a; font-weight: 600; margin-top: 8px; }
.dlc-error    { color: #dc2626; }

/* =============================================================
   Professional Pill-Style Radio Buttons
   ============================================================= */

/* Container: wraps all pills in a flex row, wraps onto next line */
.dlc-radio-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

/* Each pill label */
.dlc-pill {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

/* Hide the native radio circle */
.dlc-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* The visible pill span */
.dlc-pill span {
    display: inline-block;
    padding: 6px 18px;
    border: 2px solid #c8d6e8;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    background: #ffffff;
    transition: all 0.18s ease;
    white-space: nowrap;
    user-select: none;
    line-height: 1.4;
}

/* Hover state */
.dlc-pill:hover span {
    border-color: #003366;
    color: #003366;
    background: #f0f4f8;
}

/* Checked/selected state */
.dlc-pill input[type="radio"]:checked + span {
    background: #003366;
    border-color: #003366;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 51, 102, 0.25);
}

/* Focus-visible for keyboard accessibility */
.dlc-pill input[type="radio"]:focus-visible + span {
    outline: 2px solid #4a9eff;
    outline-offset: 2px;
}

/* YES/NO only pills — slightly wider to look balanced */
.dlc-radio-pills .dlc-pill:only-child span,
.dlc-radio-pills .dlc-pill:nth-child(1):nth-last-child(2) span,
.dlc-radio-pills .dlc-pill:nth-child(2):nth-last-child(1) span {
    min-width: 60px;
    text-align: center;
}

/* YES pill — green tint when checked */
.dlc-pill input[type="radio"][value="YES"]:checked + span {
    background: #16a34a;
    border-color: #16a34a;
}

/* NO pill — red tint when checked */
.dlc-pill input[type="radio"][value="NO"]:checked + span {
    background: #dc2626;
    border-color: #dc2626;
}

/* Inside a section that has a yellow/dark background - keep readable */
.dlc-flow-section .dlc-radio-pills .dlc-pill span {
    border-color: #94a3b8;
}
