/* df-calculator/css/df-calculator-styles.css */

/* Overall Frame */
.df-calculator-frame {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; /* Modern sans-serif font */
    background-color: #f0f8ff; /* Light blue background for the outer frame */
    padding: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px; /* Adjust as needed */
    margin: 0 auto; /* Center the calculator */
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main Calculator Container */
.df-calculator-main {
    width: 100%;
    background-color: #ffffff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.05); /* Inner subtle shadow */
}

/* Display Area */
.df-calculator-display-area {
    margin-bottom: 20px;
    text-align: right;
    padding: 10px 0;
}

.df-calculator-previous-display {
    min-height: 20px; /* Ensures space even when empty */
    color: #6c757d; /* Muted color for previous expression */
    font-size: 0.9em;
    padding-right: 5px;
    white-space: nowrap; /* Keep on one line */
    overflow: hidden; /* Hide overflow if too long */
    text-overflow: ellipsis; /* Add ellipsis for overflow */
}

.df-calculator-current-value-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.df-calculator-equals-sign {
    font-size: 1.8em;
    color: #212529; /* Darker color for equals sign */
    margin-right: 8px;
    font-weight: 500;
}

#dcube-calculator-display {
    background: none;
    border: none;
    text-align: right;
    width: 100%;
    padding: 0;
    overflow-x: scroll;
    direction: rtl; 
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none;    /* Firefox */
    height:46px;
    color: #0F2855;
    font-family: Inter;
    font-size: 32px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

/* Hide scrollbar for Chrome, Safari and Opera */
#dcube-calculator-display::-webkit-scrollbar {
    display: none;
}

#dcube-calculator-display:focus {
    outline: none; /* Remove focus outline */
}

/* Buttons Grid */
.df-calculator-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 12px; /* Space between buttons */
}

/* Base Button Style */
.df-calc-btn {
    width: 100%; /* Make buttons fill their grid cell */
    height: 60px; /* Fixed height for consistent button size */
    border: none;
    border-radius: 12px; /* Rounded corners for buttons */
    font-size: 1.3em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex; /* For centering content (like SVG) */
    justify-content: center;
    align-items: center;
    color: #343a40; /* Default text color */
    background-color: #f8f9fa; /* Light background for numbers/default */
}

.df-calc-btn:hover {
    background-color: #e9ecef;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.df-calc-btn:active {
    background-color: #dee2e6;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
    transform: translateY(1px);
}

/* Action Buttons (C, %, Backspace) */
.df-calc-btn-action {
    background-color: #F5F7F9;
    color: #148DFB;
}

.df-calc-btn-action:hover {
    background-color: #c0f1f8;
}

.df-calc-btn-action:active {
    background-color: #a0ecf0;
}

.df-calc-btn-action svg {
    width: 20px;
    height: 20px;
    stroke: #007bff; /* Match icon color to text */
}

/* Operator Buttons (+, -, ×, ÷) */
.df-calc-btn-operator {
    background-color: #007bff; /* Lighter blue */
    color: #FFF; /* Primary blue for operators */
    font-size: 1.5em; /* Slightly larger for operators */
}

.df-calc-btn-operator:hover {
    background-color: #d0edff;
}

.df-calc-btn-operator:active {
    background-color: #b9e3ff;
}

/* Equal Button */
.df-calc-btn-equal {
    background-color: #007bff; /* Solid primary blue */
    color: #ffffff; /* White text for equal button */
    font-size: 1.5em;
    font-weight: 600;
}

.df-calc-btn-equal:hover {
    background-color: #0056b3;
}

.df-calc-btn-equal:active {
    background-color: #004085;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .df-calculator-frame {
        padding: 0;
    }
    .df-calculator-main {
        padding: 15px;
    }
    .df-calc-btn {
        height: 50px;
        font-size: 1.2em;
    }
    #dcube-calculator-display {
        font-size: 2em;
    }
    .df-calculator-equals-sign {
        font-size: 1.5em;
    }
}

/* New CSS class for smaller font size */
.df-small-font {
    font-size: 1.8em !important; 
    /* Use !important if needed to override the default #dcube-calculator-display style */
}

/* =========================================
   BANK RATES TABLE CARD
   ========================================= */

.df-bank-table-card {
    background: #ffffff;
    width: 100%;
    margin-bottom: 30px;
    font-family: inherit; /* Inherit theme font */
}

/* Title Styling */
.df-bank-title {
    color: #0f172a; /* Dark Navy */
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

/* The Thick Blue Line under Title */
.df-title-divider {
    width: 100%;
    height: 3px;
    background-color: #3b82f6; /* Bright Blue */
    margin-bottom: 0;
}

/* Table Wrapper (Scrolls on mobile) */
.df-bank-table-wrapper {
    overflow-x: auto;
}

/* Table Structure */
.df-bank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    color: #334155; /* Slate Text */
}

/* Table Header */
.df-bank-table th {
    text-align: left;
    padding: 15px 20px;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap; /* Keeps header on one line */
}

/* Sort Icon (Little Triangle) */
.sort-icon {
    display: inline-block;
    margin-left: 5px;
    opacity: 0.7;
    vertical-align: middle;
}

/* Table Cells */
.df-bank-table td {
    padding: 18px 20px;
    /* No borders between rows in body, just colors */
}

/* Zebra Striping (Matches Screenshot) */
/* Odd rows = White, Even rows = Light Grey */
.df-bank-table tr:nth-child(even) {
    background-color: #f8fafc; /* Very light blue-grey */
}
.df-bank-table tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Footer Section */
.df-bank-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 10px;
}

.df-last-updated {
    font-size: 13px;
    color: #64748b; /* Light Grey text */
}

.df-footer-logo {
    height: 25px; /* Adjust logo size */
    width: auto;
}

/* The Thin Blue Line at the very bottom */
.df-bottom-divider {
    width: 100%;
    height: 1px;
    background-color: #3b82f6;
    margin-top: 5px;
}

/* Mobile Tweak */
@media (max-width: 600px) {
    .df-bank-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* =========================================
   CREDIT CARD PAYOFF STYLES (Plugin File)
   ========================================= */

.page-credit-card-pay-off-calculator .df-result-box,
.page-credit-card-monthly-repayment-calculator .df-result-box {
    border-radius: 20px;
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Watermark */
.df-cc-watermark {
    position: absolute;
    top: 20px;
    right: 20px;
    opacity: 0.3;
}

/* Header */
.df-cc-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 40px;
}

/* Main Big Stat */
.df-cc-main-stat {
    margin-bottom: 40px;
}

.label-yellow {
    color: #fcd34d; /* Yellow/Gold text */
    font-weight: 600;
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
}

.result-huge {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1;
}

/* White Details Card */
.df-cc-details-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.detail-col {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.detail-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.detail-val {
    color: #1e293b;
    font-size: 24px;
    font-weight: 700;
}

.detail-divider {
    width: 1px;
    height: 50px;
    background-color: #e2e8f0;
    margin: 0 20px;
}

/* Disclaimer */
.df-disclaimer {
    margin-top: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    line-height: 1.4;
}

/* Nav Card Styling (Reused) */
.df-calc-nav-card {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.df-calc-nav-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.1);
}
.nav-card-icon {
    margin-right: 15px;
    color: #3b82f6;
}
.nav-card-text {
    flex: 1;
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
}
.nav-card-arrow {
    color: #94a3b8;
}

/* Navigation Card (Independent) */
.df-calc-nav-card {
    display: flex;
    align-items: center;
    background: #ffffff; /* Explicit white background */
    border: 1px solid #e2e8f0; /* Subtle border */
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px; /* Space between Calc Box and this Card */
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Slight shadow to match design */
}

.df-calc-nav-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px); /* Slight lift effect */
}

/* Mobile */
@media (max-width: 768px) {
    .df-cc-details-card {
        flex-direction: column;
        gap: 20px;
    }
    .detail-divider {
        width: 100%;
        height: 1px;
        margin: 10px 0;
    }
}

.page-fixed-deposit-calculator .df-result-header,
.page-retirement-savings-calculator .df-result-header {
    display: flex;
    justify-content: space-between;
    padding-bottom: 20px;
}

.page-fixed-deposit-calculator .df-result-header > .header-right,
.page-retirement-savings-calculator .df-result-header > .header-right {
    text-align: right;
}

/* =========================================
   CUSTOM SELECT DROPDOWN (Retirement Calc)
   ========================================= */

/* 1. Reset Default Browser Style */
.df-calc-box select {
    appearance: none;        /* Remove default arrow (Chrome/Safari) */
    -webkit-appearance: none;
    -moz-appearance: none;   /* Remove default arrow (Firefox) */
    
    width: 100%;
    background-color: #f1f5f9; /* Match your input field gray */
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    outline: none;
    
    /* 2. Add Custom Arrow Icon */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    
    transition: all 0.2s ease;
}

/* Hover/Focus State */
.df-calc-box select:hover,
.df-calc-box select:focus {
    background-color: #e2e8f0; /* Slightly darker gray on interaction */
    border-color: #cbd5e1;
}

/* Ensure the wrapper allows the select to fill space */
.df-input-group .input-wrapper select {
    display: block;
    width: 100%;
    height: 100%; /* Fill the wrapper height */
}

/* =========================================
   BMI CALCULATOR STYLES
   ========================================= */

/* External Header (Yellow Title) */
.df-bmi-header-external h3 {
    color: #FFD84B; /* Amber/Yellow */
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px; /* Space between title and white box */
    text-align: center;  /* Match design centering */
    padding-top: 20px;
}

/* Main Box: White Card */
.page-bmi-calculator .df-result-box {
    background-color: #ffffff;
    border-radius: 20px;
    padding: 30px; /* Slightly tighter padding */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.page-bmi-calculator .df-result-box.is-active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Content Layout */
.df-bmi-content {
    display: flex;
    gap: 30px; /* Reduced gap */
    align-items: center;
}

/* --- LEFT: GAUGE CHART --- */
.df-bmi-chart-card {
    flex: 0 0 200px; /* Fix width to contain the gauge size */
    height: 200px;   /* Smaller height */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gauge-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.gauge-center-text {
    position: absolute;
    top: 55%; /* Push down slightly due to open bottom */
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.bmi-icon svg {
    width: 24px;
    height: 24px;
    fill: #3b82f6; /* Icon color */
    margin-bottom: 2px;
}

.gauge-center-text h2 {
    font-size: 32px; /* Smaller Number */
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.1;
}

.gauge-center-text span {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    display: block;
}

/* --- RIGHT: TABLE --- */
.df-bmi-table-card {
    flex: 1; /* Take remaining space */
}

.df-bmi-table {
    width: 100%;
    border-collapse: separate;
}

.df-bmi-table tr {
    border-bottom: 1px solid #f1f5f9;
}

.df-bmi-table td {
    padding: 10px 12px;
    color: #0F2855;
    font-size: 12px;
    font-weight: 500;
    background-color: #36415608; 
}

.df-bmi-table td:first-child {
    background-color: #3641560D;
}

.df-bmi-table td:last-child {
    padding: 10px 12px;
    color: #0F2855;
    font-size: 12px;
    font-weight: 500;
    background-color: #36415608; 
}

/* Highlight State */
.df-bmi-table tr.is-highlighted td {
    background-color: #dbeafe !important; /* Blue Highlight BG */
    color: #1e40af; /* Dark Blue Text */
    font-weight: 700; /* Bold when active */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .df-bmi-content {
        flex-direction: column;
    }
    .df-bmi-chart-card {
        height: 220px;
        width: 220px; /* Ensure it stays circular */
        margin: 0 auto;
    }
    .df-bmi-header-external h3 {
        text-align: center;
    }
}

/* =========================================
   UNIT CONVERTER STYLES (Design Update)
   ========================================= */

/* Main Wrapper */
.df-converter-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
}

/* Header & Nav (Kept same as before) */
.df-converter-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 30px;
}
.df-converter-header .text-blue { color: #3b82f6; }

.df-converter-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    top: 20px;
    z-index: 10;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 15px 25px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    font-family: inherit;
    outline: none;
}

.nav-btn.active {
    border-color: #3b82f6;
    background-color: #eff6ff;
}
.nav-btn.active .nav-label { color: #3b82f6; font-weight: 700; }
.nav-icon img { width: 32px; height: 32px; object-fit: contain; border-radius: 10px !important;}
.nav-label { font-size: 15px; font-weight: 600; color: #64748b; }

/* Content Sections */
.converter-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.table-title {
    font-size: 20px;
    font-weight: 700;
    color: #0f2855; /* Updated Dark Blue */
    margin-bottom: 20px;
}

/* --- NEW TABLE STYLING --- */

.df-table-scroll {
    overflow-x: auto;
    border-radius: 12px; /* Rounded corners for the container */
    /* NEW: Specific Shadow from design */
    box-shadow: 0 3px 18px 0 rgba(66, 147, 247, 0.25);
    border: none; /* Shadow replaces border */
    background: white;
}

.df-converter-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 900px; /* Force width for complex columns */
}

/* Header Styling */
.df-converter-table thead th {
    background-color: #1F5B91; /* Specific Blue */
    color: #ffffff;
    padding: 14px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.1); /* Subtle separators */
    vertical-align: middle; /* Aligns rowspan headers nicely */
}

/* Body Styling */
.df-converter-table tbody td {
    padding: 14px 10px;
    text-align: center;
    
    /* Specific Typography */
    color: #0F2855; 
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
}

/* Striped Rows: Alternate Background */
.df-converter-table tbody tr:nth-child(even) {
    background-color: #F0F6FD; /* Light Blue tint */
}

.df-converter-table tbody tr:hover {
    background-color: #e0f2fe; /* Hover effect */
}

/* =========================================
   ADULT SHOE TABLE SPECIFIC STYLES
   ========================================= */

/* 1. Header Colors */
.df-adult-table .th-main {
    background-color: #1F5B91; /* Main Dark Blue */
    border-right: 1px solid rgba(255,255,255,0.1);
}

.df-adult-table .th-group {
    background-color: #1F5B91;
    border-bottom: 1px solid #148DFB; /* Separator between "Japan" and "M/W" */
}

/* Specific M/F Backgrounds */
.df-adult-table .th-m {
    background-color: #2870B1 !important; /* Medium Blue */
    border-right: 1px solid #148DFB; /* Bright Blue Separator */
}

.df-adult-table .th-f {
    background-color: #4286C4 !important; /* Lighter Blue */
    border-right: 1px solid #148DFB; /* Separator to next group */
}

/* 2. Body Borders */
/* Only apply the bright blue border to the columns corresponding to M/F splits */
/* This targets every 2nd cell in the M/F groupings to create that vertical divider look */
.df-adult-table td {
    border: none; /* Reset default */
    border-bottom: 1px solid #e2e8f0; /* Horizontal lines only */
}

/* Re-apply vertical borders only where needed (Between regions) */
/* Columns indices: 0(Eur), 1(Mex), 2(J-M), 3(J-W), 4(UK-M), 5(UK-F)... */
/* We want borders after column 1, 3, 5, 7, 9 */

.df-adult-table td:nth-child(2), /* Mexico */
.df-adult-table td:nth-child(4), /* Jap W */
.df-adult-table td:nth-child(6), /* UK F */
.df-adult-table td:nth-child(8), /* Aus F */
.df-adult-table td:nth-child(10) /* US F */
{
    border-right: 1px solid #148DFB; /* Bright Blue Vertical Line */
}

/* Also separate M from F/W inside the group */
.df-adult-table td:nth-child(3), /* Jap M */
.df-adult-table td:nth-child(5), /* UK M */
.df-adult-table td:nth-child(7), /* Aus M */
.df-adult-table td:nth-child(9)  /* US M */
{
    border-right: 1px solid rgba(20, 141, 251, 0.3); /* Softer line between M/F */
}


/* 3. Show More / Hidden Rows */
.row-hidden {
    display: none;
}

.df-btn-text-only {
    background: none;
    border: none;
    color: #3b82f6;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 20px auto 0 auto; /* Center it */
    padding: 10px;
}

.df-btn-text-only:hover {
    text-decoration: underline;
}

/* =========================================
   CHILDREN SHOE TABLE STYLES
   ========================================= */

/* Use the same main blue header */
.df-child-table .th-main {
    background-color: #1F5B91;
    border-right: 1px solid rgba(255,255,255,0.1);
}

/* Simple Borders for Body */
/* Since Child table is simple (4 columns), we don't need complex vertical dividers */
.df-child-table td {
    border: none;
    border-bottom: 1px solid #e2e8f0;
}

.df-child-table td:last-child {
    border-right: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-btn { flex: 1; justify-content: center; min-width: auto; padding: 12px; }
    .nav-label { font-size: 13px; }
}

/* =========================================
   CURRENCY CONVERTER STYLES
   ========================================= */

.df-currency-wrapper {
    max-width: 600px; /* Limits width to look like the design */
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

/* Header */
.df-currency-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 40px;
}
.df-currency-header .text-blue { color: #3b82f6; }

/* The White Card */
.df-currency-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); /* Soft shadow */
    position: relative;
    text-align: left;
}

/* Rows */
.currency-row {
    margin-bottom: 10px;
}

.currency-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6; /* Blue Labels */
    margin-bottom: 8px;
}

/* Input Group (Flex) */
.currency-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Custom Select Styling */
.currency-input-group select {
    flex: 0 0 100px; /* Fixed width for currency code */
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* Input Field */
.currency-input-group input {
    flex: 1; /* Takes remaining space */
    background-color: #f1f5f9; /* Light gray bg */
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    color: #1e293b;
    font-weight: 500;
    outline: none;
}
.currency-input-group input:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
}

/* Readonly Result Input */
.currency-input-group input[readonly] {
    background-color: #f8fafc;
    color: #64748b;
}

/* SWAP BUTTON (The Blue Circle) */
.currency-swap-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: relative;
    height: 20px; /* Minimal height to not push layout too much */
}

/* Main Convert Button */
.df-btn-primary {
    width: 100%;
    margin-top: 30px;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.df-btn-primary:hover {
    background-color: #2563eb;
}

.currency-swap-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    position: relative;
    height: 40px; /* Give it enough space */
}

.swap-btn {
    /* Reset Button Styles */
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    
    /* Sizing */
    width: 48px;  /* Adjust based on how big you want the icon */
    height: 48px;
    
    /* Flex to center image */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Animation */
    transition: transform 0.3s ease;
    z-index: 2;
}

.swap-btn img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
}

/* Hover Effect: Rotate */
.swap-btn:hover {
    transform: rotate(180deg);
}

/* Mobile */
@media (max-width: 480px) {
    .currency-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .currency-input-group select {
        flex: auto;
    }
}

/* =========================================
   UNIT CONVERTER STYLES
   ========================================= */

.df-unit-wrapper {
    max-width: 600px;
    margin: 0 auto;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

/* Header */
.df-unit-header h2 {
    font-size: 32px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 40px;
}
.df-unit-header .text-blue { color: #3b82f6; }

/* Card */
.df-unit-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    position: relative;
    text-align: left;
}

/* Rows */
.unit-row {
    margin-bottom: 25px; /* Spacing between rows */
}

.unit-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #3b82f6; /* Blue Labels */
    margin-bottom: 8px;
}

/* 1. Full Width Select (for Type) */
.df-full-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-color: #f1f5f9; /* Light gray to match screenshot */
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    color: #1e293b;
    font-weight: 500;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

/* 2. Input Group (Input + Unit Dropdown) */
.unit-input-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* The Amount Input */
.unit-input-group input {
    flex: 1; 
    background-color: #f1f5f9; 
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 16px;
    color: #1e293b;
    font-weight: 500;
    outline: none;
}
.unit-input-group input:focus {
    background-color: #ffffff;
    border-color: #3b82f6;
}

/* The Unit Dropdown (Right side) */
.unit-select {
    flex: 0 0 140px; /* Fixed width for the unit name */
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px 10px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

/* Swap Icon */
.unit-swap-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -10px 0 15px 0; /* Tighten the gap */
    height: 40px; 
}
.swap-btn {
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}
.swap-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.swap-btn:hover {
    transform: rotate(180deg);
}

/* Main Button */
.df-btn-primary {
    width: 100%;
    margin-top: 10px;
    padding: 16px;
    font-size: 18px;
    font-weight: 700;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.df-btn-primary:hover {
    background-color: #2563eb;
}

/* Mobile */
@media (max-width: 480px) {
    .unit-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .unit-select {
        flex: auto;
    }
}