.trade-in-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.trade-in-popup-overlay.active {
    opacity: 1;
}
.trade-in-popup-content {
    background: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-height: 90%;
    display: flex;
    flex-direction: column;
    font-family: 'Michroma', 'Roboto', sans-serif !important;
}
.trade-in-popup-content input, 
.trade-in-popup-content select, 
.trade-in-popup-content textarea,
.trade-in-popup-content .form-group label,
.trade-in-popup-content label {
    font-family: 'Roboto', sans-serif !important;
}
.trade-in-popup-content button {
    font-family: 'Michroma', 'Roboto', sans-serif !important;
}
.trade-in-popup-overlay.active .trade-in-popup-content {
    transform: translateY(0);
}
.trade-in-popup-header {
    background: var(--clr-primary);
    color: #fff;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    text-align: center;
}
.trade-in-popup-header h3 {
    margin: 0 0 5px 0;
    font-size: 1.25rem;
    color: #fff;
}
.trade-in-popup-header p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}
.trade-in-popup-body {
    padding: 20px;
    overflow-y: auto;
}
.trade-in-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    color: #333;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trade-in-popup-close:hover {
    background: #f1f1f1;
    color: #e74c3c;
}

/* Responsive details for small devices */
@media (max-width: 768px) {
    .trade-in-popup-overlay {
        padding: 16px !important;
    }
    .trade-in-popup-content {
        width: calc(100% - 32px) !important;
        margin: 16px !important;
        max-height: 85vh !important;
    }
    .trade-in-popup-header {
        padding: 15px !important;
    }
    .trade-in-popup-body {
        padding: 15px !important;
    }
    .trade-in-popup-close {
        top: 10px !important;
        right: 10px !important;
        width: 30px !important;
        height: 30px !important;
        font-size: 20px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
    }

    /* Form inside popup inline layout */
    #trade-in-popup-modal .trade-in-form .form-group {
        display: grid !important;
        grid-template-columns: 35% 1fr !important;
        align-items: center;
        gap: 5px 10px;
    }
    #trade-in-popup-modal .trade-in-form .form-group label {
        margin-bottom: 0 !important;
        grid-column: 1 / 2;
        padding-right: 0px;
        line-height: 1.3;
        text-align: left;
    }
    #trade-in-popup-modal .trade-in-form .form-group .input-status-wrapper,
    #trade-in-popup-modal .trade-in-form .form-group .custom-make-dropdown,
    #trade-in-popup-modal .trade-in-form .form-group > select,
    #trade-in-popup-modal .trade-in-form .form-group > input:not([type="hidden"]),
    #trade-in-popup-modal .trade-in-form .form-group > textarea {
        grid-column: 2 / 3;
        width: 100% !important;
        margin-top: 0 !important;
    }
}
