/* =======================================================
   MF Sort Dropdown - Final Consolidated Style
   (BUTTON SIZE INCREASED)
   ======================================================= */

/* 1. Wrapper (Container) */
.mf-sort-wrap{
    position:relative;
    display:inline-block;
    font-family: "Inter", system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    z-index: 20;
}

/* 2. Main Button (.mf-sort-btn) - Unified Style */
.mf-sort-btn {
  background: #ffffff;
  color: #333333;
  border: 1px solid #e4e5e7;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Hover */
.mf-sort-btn:hover {
  background: #f0f0f0;
  color: #111111;
}

/* Focus/Active fix (no blue highlight) */
.mf-sort-btn:focus,
.mf-sort-btn:active {
  outline: none !important;
  box-shadow: none !important;
  background: #ffffff;
  color: #333333;
  border-color: #e4e5e7;
}

/* Active/Open state */
.mf-sort-btn[aria-expanded="true"] {
  background: #e9f5ff;
  border-color: #0087ff;
  color: #0087ff;
}

/* Remove Firefox inner border */
.mf-sort-btn::-moz-focus-inner {
  border: 0;
}

/* 4. Dropdown Panel */
.mf-sort-dropdown{
    /* Position and Layout */
    position: absolute;
    top: 100%;
    left: 0; 
    width: 280px;
    margin-top: 10px;
    /* Styling */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    padding: 16px;
    /* Hide by default */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.mf-sort-dropdown.open,
.mf-sort-dropdown[aria-hidden="false"]{
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 5. Radio List */
.mf-sort-options{
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}
.mf-sort-options li{
    padding: 6px 0;
}
.mf-sort-options label{
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.15s ease;
    width: 100%;
    margin-bottom: 0;
}
.mf-sort-options label:hover{
    background: #f0f0f0;
}
.mf-sort-options input[type="radio"]{
    /* Custom radio styling to match Fiverr/modern design */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 50%;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-top: 0;
    margin-bottom: 0;
}
.mf-sort-options input[type="radio"]:checked{
    background-color: #0087ff; /* Blue fill when checked */
    border-color: #0087ff;
    box-shadow: 0 0 0 3px #fff inset; /* Inner white circle effect */
}
.mf-sort-options input[type="radio"]:focus{
    box-shadow: 0 0 0 3px #fff inset, 0 0 0 5px rgba(0, 135, 255, 0.5);
}

/* 7. Action Buttons Container */
.mf-sort-actions{
    display: flex;
    gap: 8px;
}
.mf-sort-actions button{
    border: none;
    padding: 8px 14px;
    border-radius: 6px; 
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease; 
    width: 50%;
    flex-shrink: 0;
}

/* 9. Apply Button (Standard Primary Green) */
.mf-sort-apply{
    background: #1dbf73; 
    color: #fff;
}
.mf-sort-apply:hover{
    background: #14a05b; 
}
.mf-sort-apply:focus {
    outline: none;
    box-shadow: none;
}

/* 10. Clear Button (Standard Secondary Neutral) */
.mf-sort-clear{
    background: transparent;
    color: #777; 
}
.mf-sort-clear:hover{
    background: #f0f0f0; 
    color: #111111;
}
.mf-sort-clear:focus {
    outline: none;
    box-shadow: none;
}

/* 11. Mobile Responsive Design (Bottom Sheet) */
@media (max-width:768px){ 
    .mf-sort-dropdown{
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        margin-top: 0;
        border-radius: 12px 12px 0 0;
        border: none;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
        transform: translateY(100%); /* Start off-screen */
    }
    .mf-sort-dropdown.open,
    .mf-sort-dropdown[aria-hidden="false"]{
        transform: translateY(0); /* Slide up */
    }
}
