/* =========================================
   1. INPUT FIELDS (Fixed Alignment & Keyboard Prevent)
   ========================================= */

/* মেইন ট্রিগার কন্টেইনার (যেখানে ক্লিক করলে পপ-আপ আসবে) */
.input-field.clickable-trigger {
  position: relative;
  cursor: pointer;
  z-index: 1; /* নিশ্চিত করা হলো এটি ক্লিক রিসিভ করবে */
  transition: all 0.2s ease;
}

/* === KEYBOARD PREVENT LOGIC (Main Fix) === */
/* ইনপুটের উপর ক্লিক ইভেন্ট বন্ধ করা হলো যাতে কিবোর্ড না আসে */
/* ক্লিকটি সরাসরি প্যারেন্ট div-এ চলে যাবে */
.clickable-trigger input {
  pointer-events: none !important; /* কিবোর্ড আসা বন্ধ করবে */
  caret-color: transparent;        /* কার্সর হাইড করবে */
  user-select: none;               /* টেক্সট সিলেক্ট করা বন্ধ করবে */
  background-color: transparent;   /* ট্রান্সপারেন্ট */
}

/* RTL Padding Fix & Visual Style */
.clickable-trigger input {
  padding-left: 45px !important; /* অ্যারো আইকনের জন্য জায়গা */
}

/* Arrow Icon Logic (Updated for Animation) */
.custom-arrow {
  position: absolute;
  left: 20px;
  top: 50%;
  /* ডিফল্ট পজিশন: ভার্টিকালি সেন্টারে */
  transform: translateY(-50%); 
  color: var(--primary); /* আপনার প্রাইমারি কালার ভেরিয়েবল */
  pointer-events: none;  
  font-size: 1rem;
  z-index: 5;
  /* এনিমেশন ট্রানজিশন */
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === ACTIVE STATE ANIMATION === */
/* যখন পপ-আপ ওপেন হবে, তখন অ্যারো ঘুরবে */
.clickable-trigger.active-state .custom-arrow {
  /* translateY(-50%) রাখা জরুরি যাতে সেন্টারে থেকেই ঘোরে */
  transform: translateY(-50%) rotate(180deg);
  color: #ee9f0d; /* একটিভ হলে কালার চেঞ্জ (অপশনাল, সুন্দর দেখাবে) */
}

/* ইনপুট বর্ডারেও একটু ইফেক্ট দেওয়া যেতে পারে (অপশনাল) */
.clickable-trigger.active-state input {
  border-color: #ee9f0d;
}


/* =========================================
   2. ULTRA CLEAN MINIMAL MODAL (No Icon)
   ========================================= */

/* Overlay */
.clean-modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px); /* Desktop Blur */
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center; /* Desktop: Center */
  justify-content: center; /* Desktop: Center */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.clean-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Box - Compact & Clean (Desktop Default) */
.clean-modal-box {
  background: #ffffff;
  width: 90%;
  max-width: 380px; /* Slightly narrower for compact look */
  border-radius: 24px;
  padding: 30px 25px 25px 25px; 
  position: relative;
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.2);
  
  /* Desktop Animation */
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
  
  display: flex;
  flex-direction: column;
}

.clean-modal-overlay.active .clean-modal-box {
  transform: translateY(0);
  opacity: 1;
}

/* Close Button */
.clean-close-btn {
  position: absolute;
  top: 15px;
  left: 15px; /* RTL Layout: বাম পাশে */
  width: 32px;
  height: 32px;
  background: #f5f5f5;
  color: #666;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-size: 16px;
  z-index: 10;
}

.clean-close-btn:hover {
  background: #fee2e2;
  color: #ef4444;
  transform: rotate(90deg);
}

/* Header (Text Only - Compact) */
.clean-modal-header {
  text-align: center;
  margin-bottom: 20px;
  margin-top: 10px; 
  padding-bottom: 15px;
  border-bottom: 1px solid #f3f4f6; 
}

.clean-modal-header h3 {
  font-family: "Alexandria", serif;
  color: #ee9f0d;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px 0;
}

.modal-subtitle {
  font-family: "Rubik", serif;
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0;
}

/* Option List */
.clean-modal-body {
  overflow-y: auto;
  max-height: 55vh;
  padding: 5px 2px;
  scrollbar-width: none;
}
.clean-modal-body::-webkit-scrollbar {
  display: none;
}

.clean-options-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Option Items */
.clean-option-item {
  position: relative;
  background: #f9fafb;
  padding: 16px 20px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 2px solid transparent;
}

.clean-option-item:hover {
  background: #ffffff;
  border-color: rgba(238, 159, 13, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.clean-option-item.selected {
  background: #ffffff;
  border-color: #ee9f0d;
  box-shadow: 0 4px 15px -3px rgba(238, 159, 13, 0.2);
}

.option-label {
  font-family: "Rubik", serif;
  font-weight: 500;
  font-size: 1.05rem;
  color: #374151;
}

.clean-option-item.selected .option-label {
  color: #ee9f0d;
  font-weight: 600;
}

/* Radio Button */
.custom-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  position: relative;
}

.custom-radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 10px;
  height: 10px;
  background: #ee9f0d;
  border-radius: 50%;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.clean-option-item.selected .custom-radio {
  border-color: #ee9f0d;
}

.clean-option-item.selected .custom-radio::after {
  transform: translate(-50%, -50%) scale(1);
}

/* =========================================
   SCROLL LOCK UTILITY
   ========================================= */
body.no-scroll {
  overflow: hidden !important; 
  height: 100vh; 
  touch-action: none; 
  padding-right: 0px; 
}

/* =========================================
   MOBILE RESPONSIVE (FACEBOOK STYLE BOTTOM SHEET)
   ========================================= */

@media (max-width: 600px) {
    /* ১. ওভারলে পজিশন: একদম নিচে */
    .clean-modal-overlay {
        align-items: flex-end; 
        padding: 0;
        backdrop-filter: blur(8px); /* মোবাইলে একটু বেশি ব্লার */
    }

    /* ২. মেইন বক্স: নিচ থেকে উঠবে */
    .clean-modal-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        
        /* Facebook Style Rounded Corners */
        border-radius: 24px 24px 0 0 !important;
        
        padding: 30px 20px 40px 20px !important; /* Bottom padding for safety */
        
        /* Animation: Start below screen */
        transform: translateY(100%); 
        opacity: 1; /* Opacity সবসময় ১ থাকবে */
        transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    /* Active State: উপরে উঠে আসবে */
    .clean-modal-overlay.active .clean-modal-box {
        transform: translateY(0);
    }

    /* ক্লোজ বাটন পজিশন */
    .clean-close-btn {
        top: 20px;
        left: 20px;
    }

    /* হেডার টেক্সট */
    .clean-modal-header h3 {
        font-size: 1.25rem !important;
        margin-bottom: 4px !important;
    }
    
    .clean-option-item {
        padding: 14px 16px !important;
        border-radius: 12px !important;
    }
    
    .option-label {
        font-size: 0.95rem !important;
    }
}