body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
/*start*/
    
.converter-card { background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); overflow: visible !important; }
.currency-flag { width: 24px; height: 18px; object-fit: cover; margin-right: 10px; border: 1px solid #eee; border-radius: 2px; }
.rate-trend-up { color: #198754; }
.rate-trend-down { color: #dc3545; }
        
 /* Custom Dropdown Styling */
.currency-dropdown-btn {
            background: transparent;
            border: none;
            display: flex;
            align-items: center;
            font-weight: 700;
            font-size: 1.1rem;
            color: #212529;
            padding: 5px;
            cursor: pointer;
            width: 100%;
            justify-content: space-between;
        }
        .currency-dropdown-btn:hover, .currency-dropdown-btn:focus {
            background-color: #f8f9fa;
            border-radius: 4px;
        }
        .currency-dropdown-menu {
            max-height: 300px;
            overflow-y: auto;
            width: 300px;
            padding: 0;
            z-index: 9999; /* High z-index to ensure visibility */
        }
        .currency-option {
            padding: 10px 15px;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: background-color 0.2s;
        }
        .currency-option:hover {
            background-color: #f1f3f5;
        }
        .currency-option.selected {
            background-color: #e9ecef;
            font-weight: 600;
        }
        .currency-search-container {
            position: sticky;
            top: 0;
            background: white;
            padding: 10px;
            border-bottom: 1px solid #eee;
            z-index: 10000; /* Ensure search stays on top of list */
        }

        /* Input Styling */
        .currency-input-box {
            border: 1px solid #ced4da;
            border-radius: 8px;
            padding: 15px;
            transition: border-color 0.2s, box-shadow 0.2s;
            background: #fff;
        }
        .currency-input-box:focus-within {
            border-color: #86b7fe;
            box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
        }
        .currency-label {
            font-size: 0.9rem;
            color: #6c757d;
            margin-bottom: 5px;
            font-weight: 500;
        }
        .amount-input {
            border: none;
            font-size: 18px;
            font-weight: 700;
            width: 100%;
            padding: 0;
            outline: none;
            background: transparent;
        }
        /* Remove arrows from number input */
        .amount-input::-webkit-outer-spin-button,
        .amount-input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        .amount-input {
            -moz-appearance: textfield;
        }

        .swap-btn-container {
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 10;
        }
        @media (min-width: 768px) {
            .swap-btn-container {
                margin-top: 20px; 
            }
        }
        .swap-btn {
            width: 45px;
            height: 45px;
            border-radius: 50%;
            border: 1px solid #ced4da;
            background: #fff;
            color: #0d6efd;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
        }
        .swap-btn:hover {
            background-color: #f8f9fa;
            transform: rotate(180deg);
        }
/*end*/

.hero-section {
    background-color: #333333;
    background-image: radial-gradient(circle at center, #444 0%, #333 100%);
    min-height: 500px;
}

.upload-area {
    background: rgba(0, 0, 0, 0.2);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 600px;
    margin: 0 auto;
}

.upload-area:hover, .upload-area.dragover {
    background: rgba(0, 0, 0, 0.3);
    border-color: #fff;
    transform: scale(1.01);
}

.card {
    border-radius: 8px;
    overflow: hidden;
}

.table > :not(caption) > * > * {
    padding: 1rem;
}

.status-badge {
    min-width: 80px;
    text-align: center;
}

.btn-danger {
    background-color: #ff3333;
    border: none;
}

.btn-danger:hover {
    background-color: #e60000;
}

/* Dropdown dark theme */
select.bg-dark option {
    background-color: #333;
    color: white;
}

/* Custom Colors */
.text-purple {
    color: #6f42c1 !important;
}

/* Header Menu Alignment */
@media (min-width: 992px) {
    /* Ensure the navbar acts as the positioning context */
    .navbar {
        position: relative;
    }
    
    /* Ensure the container and collapse don't interfere with positioning */
    .navbar .container,
    .navbar-collapse {
        position: static;
    }

.navbar-center-custom {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin: 0 !important; /* Override mx-auto */
        width: auto;
        justify-content: center;
    }
}

.dropdown-menu.megamenu {
    width: 900px;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 991.98px) {
    .dropdown-menu.megamenu {
        width: 100%;
        left: 0;
        transform: none;
    }
}

#chatbot-widget {
    z-index: 1050;
    width: 300px;
    height: 600px;
    max-height: 60vh;
}

#chatbot-launcher {
    z-index: 1040;
}

#chatbot-launcher button {
    width: 60px;
    height: 60px;
}

/* Supported Formats Section */
.supported-formats-section .format-row {
    transition: background-color 0.2s ease;
}

.supported-formats-section .format-row:hover {
    background-color: #f8f9fa;
}

.supported-formats-section .format-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fa-2x {
    font-size: 23px !important;
}

/* Feedback Popup */
#feedback-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1060; /* Above chatbot */
    width: 320px;
    background: white;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    display: none;
    animation: slideInUp 0.3s ease-out;
    border: 1px solid rgba(0,0,0,.05);
}

@keyframes slideInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.star-rating {
    font-size: 1.75rem;
    color: #ffc107;
    cursor: pointer;
    display: inline-flex;
    gap: 5px;
}

.star-rating .far {
    color: #e9ecef;
    transition: color 0.2s;
}

.star-rating .fas {
    color: #ffc107;
}

.star-rating i:hover {
    transform: scale(1.1);
}

.star-tooltip {
    position: absolute;
    background: #212529;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    display: none;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 1070;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.star-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #212529 transparent transparent transparent;
}

/* Chat Link Style */
.chat-link {
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
}

.chat-link:hover {
    color: #0a58ca;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* File List Footer */
    #file-list-container .card-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem;
    }

    #file-list-container .card-footer > button {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* Container for "Convert all to" controls */
    #file-list-container .card-footer > div {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem !important;
    }

    #convert-all-label {
        width: 100%;
        text-align: center;
        margin-bottom: 0.25rem;
    }

    #global-format-select {
        width: 100% !important;
        margin-bottom: 0.5rem;
    }

    #convert-all-btn {
        width: 100%;
    }

    /* File List Table Rows */
    #file-table-body tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0; /* Remove padding from tr so tds cover edge-to-edge */
        border-bottom: 1px solid #dee2e6;
    }

    #file-table-body td {
        display: block;
        padding: 0.5rem 0.75rem !important; /* Increase padding */
        border: none;
    }

    /* Filename: Full width */
    #file-table-body td:nth-child(1) {
        width: 85% !important;
        order: 1;
        padding-top: 1rem !important; /* Extra top padding for the first row */
    }

    /* Remove Button: Top right next to filename */
    #file-table-body td:nth-child(5) {
        width: 15% !important;
        text-align: right;
        order: 2;
        padding-top: 1rem !important; /* Align with filename */
    }

    /* Arrow: Hide it to save space */
    #file-table-body td:nth-child(2) {
        display: none;
    }

    /* Format Select: Full width on second row */
    #file-table-body td:nth-child(3) {
        width: 100% !important;
        order: 3;
        margin-top: 0; /* Remove margin */
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    #file-table-body td:nth-child(3) .d-flex {
        width: 100%;
    }
    
    #file-table-body td:nth-child(3) select.format-select {
        flex-grow: 1;
        width: auto !important; /* Allow it to grow */
        max-width: none;
    }

    /* Status: Full width at the bottom */
    #file-table-body td:nth-child(4) {
        width: 100% !important;
        text-align: left !important;
        order: 4;
        margin-top: 0; /* Remove margin */
        padding-top: 0.5rem !important;
        padding-bottom: 1rem !important; /* Extra bottom padding for last row */
    }
    
    #file-table-body td:nth-child(4) .status-badge {
        width: 100%;
        display: block;
    }
}
