/* ==================================================
   GLOBAL RESET
   ================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* ==================================================
   SELECT2 – NO SHIFT / NO OVERFLOW
   ================================================== */
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

.select2-selection--single {
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    background: #ffffff !important;
}

.select2-selection__rendered {
    padding: 0 40px 0 14px !important;
    font-size: 15px;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.select2-selection__arrow {
    height: 100% !important;
    right: 12px !important;
}

.select2-dropdown {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 8px;
    overflow: hidden;
}

.select2-search__field {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 12px !important;
    font-size: 14px;
}

/* Result item */
.mp-select2-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mp-select2-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* ==================================================
   MODAL OVERLAY
   ================================================== */
.mp-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9999;
    display: none;
}

/* ==================================================
   MODAL CONTENT
   ================================================== */
.mp-modal-content {
    position: relative;
    background: #ffffff;
    max-width: 560px;
    width: 94%;
    margin: 5vh auto;
    padding: 36px 36px 42px;
    border-radius: 14px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    max-height: 90vh;
    overflow-y: auto;
}

/* ==================================================
   MODAL CLOSE (X)
   ================================================== */
.mp-cancel {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    line-height: 1;

    color: #6b7280;
    background: transparent;

    border: none;
    border-radius: 6px;
    cursor: pointer;

    transition: background 0.15s ease, color 0.15s ease;
    z-index: 50;
}

.mp-cancel:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ==================================================
   FORM – CLEAN & SPACED
   ================================================== */
#mp-price-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

#mp-price-form input,
#mp-price-form select,
#mp-price-form textarea {
    width: 100%;
    height: 52px;
    padding: 14px 16px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fcfcfd;
}

#mp-price-form textarea {
    height: auto;
    min-height: 120px;
}

#mp-price-form input:focus,
#mp-price-form select:focus,
#mp-price-form textarea:focus {
    outline: none;
    border-color: #ff7a00;
    box-shadow: 0 0 0 4px rgba(255,122,0,0.15);
}

/* ==================================================
   SUBMIT BUTTON
   ================================================== */
.mp-submit {
    background: #ff7a00;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
}

/* ==================================================
   MOBILE OPTIMIZATION
   ================================================== */
@media (max-width: 600px) {

    .mp-modal-content {
        padding: 24px 20px 90px;
    }

    .mp-submit {
        position: sticky;
        bottom: 0;
        width: 100%;
        z-index: 10;
    }

    .mp-cancel {
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 22px;
    }
}
/* ==============================
   MACHINE PREVIEW – CLEAN CARD
   ============================== */
#mp-machine-preview {
    margin-top: 24px;           /* 🔥 Arama barından kopar */
    display: none;
}

.mp-preview {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fafafa;
}
/* Arama sonuçlarındaki resimler */
.mp-select2-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;   /* 🔥 */
}

/* Seçilen makine preview resmi */
#mp-machine-image {
    width: 180px;
    max-width: 100%;
    border-radius: 14px; /* 🔥 Daha premium */
    object-fit: cover;
}
/* ==============================
   MODAL CTA – ADSENSE SAFE ZONE
   ============================== */

/* Modal scroll alanı */
.mp-modal-content {
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: 120px; /* 🔥 CTA + Ads güvenlik alanı */
}
/* Submit button – always visible */
.mp-submit {
    position: sticky;
    bottom: 0;

    width: 100%;
    margin-top: 24px;

    z-index: 50;

    background: #ff7a00;
    color: #fff;

    box-shadow: 0 -12px 30px rgba(0,0,0,0.12);
}
@media (max-width: 768px) {

    .mp-modal-content {
        padding-bottom: 140px; /* 🔥 Mobil ads buffer */
    }

    .mp-submit {
        font-size: 17px;
        padding: 18px;
        border-radius: 14px;
    }
}
/* Select2 dropdown result area – more items visible */
.select2-results__options {
    max-height: 420px; /* 🔥 yaklaşık 10–12 sonuç */
    overflow-y: auto;
}

/* Mobile biraz daha kısa */
@media (max-width: 768px) {
    .select2-results__options {
        max-height: 300px;
    }
}
.select2-container--open .select2-results__options {
    max-height: 460px !important;
}
@media (max-width: 768px) {
    .select2-container--open .select2-results__options {
        max-height: 320px !important;
    }
}
/* SUCCESS MODAL OVERLAY */
.mp-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

/* MODAL BOX */
.mp-success-box {
    background: #ffffff;
    width: 420px;
    max-width: 90%;
    padding: 32px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: mpFadeUp 0.3s ease;
    font-family: system-ui, -apple-system, BlinkMacSystemFont;
}

/* ICON */
.mp-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    font-size: 36px;
    line-height: 64px;
    font-weight: bold;
}

/* TITLE */
.mp-success-box h3 {
    margin: 10px 0;
    font-size: 22px;
    color: #222;
}

/* TEXT */
.mp-success-box p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 22px;
}

/* BUTTON */
.mp-success-box button {
    background: #ff6a00;
    border: none;
    color: #fff;
    padding: 12px 28px;
    font-size: 15px;
    border-radius: 8px;
    cursor: pointer;
}

.mp-success-box button:hover {
    background: #e85f00;
}

/* ANIMATION */
@keyframes mpFadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* SUCCESS MODAL – SAFE HIDDEN */
#mp-success-modal {
    display: none;
    pointer-events: none;
}

/* SUCCESS MODAL – ACTIVE */
#mp-success-modal.active {
    display: flex;
    pointer-events: auto;
}

