/* Font Definitions */
@font-face {
    font-family: 'Odudo';
    src: url('fonts/Odudo-Light.otf') format('opentype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Odudo';
    src: url('fonts/Odudo-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Odudo';
    src: url('fonts/Odudo-SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Odudo';
    src: url('fonts/Odudo-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Myriad Pro';
    src: url('fonts/MyriadPro-Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Myriad Pro';
    src: url('fonts/MyriadPro-Semibold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Myriad Pro';
    src: url('fonts/MyriadPro-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100vh;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

body {
    font-family: 'Myriad Pro', Arial, sans-serif;
    background-color: #f5f5f5;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    background-color: #f5f5f5;
    min-height: 100vh;
}

/* ==================== */
/* PROMO SLIDER SECTION */
/* ==================== */
.promo-slider {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #808080;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slider-slide {
    width: 100%;
    min-width: 100%;
    flex: 0 0 100%;
    position: relative;
}

.slider-slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Glassmorphism Label - iOS Style */
.slide-label {
    position: absolute;
    top: 8px;                      
    left: 50%;                     
    transform: translateX(-50%);   
    padding: 4px 7px;              
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 6px;             
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); 
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 600;
    font-size: 9px;               
    color: #ffffff;
    line-height: 1.2;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 5;
    max-width: 50%;                
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.slider-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.slider-placeholder.hidden {
    display: none;
}

.placeholder-bg {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background-color: #808080;
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-dot.active {
    background-color: #ffffff;
}

/* ==================== */
/* HEADER SECTION       */
/* ==================== */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding-left: 16px;
    min-height: 70px;
    position: relative;
    overflow: visible;
}

.header-left {
    flex: 1;
    padding: 12px 0;
}

.header-title {
    font-family: 'Odudo', sans-serif;
    font-weight: 700;
    font-size: 27px;
    color: #333333;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #666666;
    margin-top: 2px;
}

.header-right {
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}

/* Toggle Wrapper - The Red Panel */
.toggle-wrapper {
    display: flex;
    align-items: center;
    background: #ff0000;
    border-radius: 35px 0 0 35px;
    cursor: pointer;
    position: relative;
    height: 56px;
    padding-left: 12px;
    padding-right: 90px;
    box-shadow: 
        inset 0 -3px 6px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.15),
        0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    transform-origin: right center;
}

/* Press effect animation - only when not active */
.toggle-wrapper:not(.active) {
    animation: subtlePress 2s ease-in-out infinite;
}

.toggle-wrapper:not(.active):active {
    transform: scale(0.97);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Glare/Shine effect - only when not active */
.toggle-wrapper:not(.active)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 0%,
        transparent 40%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 60%,
        transparent 100%
    );
    animation: glareShine 3s ease-in-out infinite;
    z-index: 1;
}

/* Remove effects when active */
.toggle-wrapper.active {
    animation: none;
    box-shadow: 
        inset 0 2px 6px rgba(0, 0, 0, 0.25),
        0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-wrapper.active::before {
    display: none;
}

.toggle-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-radio {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffffff;
    flex-shrink: 0;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.toggle-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #4CAF50;
    transition: transform 0.3s ease;
}

.toggle-wrapper.active .toggle-radio::after {
    transform: translate(-50%, -50%) scale(1);
}

.toggle-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
    margin-left: -4px;
}

.toggle-text span {
    font-family: 'Odudo', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #ffffff;
}

.kurir-img {
    position: absolute;
    right: 0;
    top: 36%;
    transform: translateY(-50%);
    width: 95px;
    height: auto;
    z-index: 10;
    pointer-events: none;
}

/* ==================== */
/* OUTLET CARDS SECTION */
/* ==================== */
.outlet-cards {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Outlet Card */
.outlet-card {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e8e8e8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.outlet-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.outlet-card.nearest-highlight {
    border: 3px solid #4CAF50;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.25);
}

.card-content {
    display: flex;
    padding: 12px;
    gap: 12px;
}

.card-image {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background-color: #f0f0f0;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-rating {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background-color: rgba(50, 50, 50, 0.85);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-rating .star {
    color: #FFD700;
    font-size: 11px;
}

.card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-width: 0;
    padding-right: 5px;
}

.card-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 4px;
}

.status-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.status-icon.closed {
    color: #ff6b35;
}

.status-icon.open {
    color: #4CAF50;
}

.status-text {
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 400;
    font-size: 13px;
    color: #888888;
}

.card-name {
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #333333;
    line-height: 1.2;
    margin-bottom: 4px;
}

.card-address {
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #4CAF50;
    line-height: 1.3;
}

.card-distance {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #2196F3;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
}

/* Delivery Status Bar */
.delivery-status {
    padding: 10px 16px;
    text-align: center;
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 700;
    font-size: 14px;
}

.delivery-status.available {
    background-color: #4CAF50;
    color: #ffffff;
}

.delivery-status.unavailable {
    background-color: #ff0000;
    color: #ffffff;
}

/* ==================== */
/* LOADING PLACEHOLDERS */
/* ==================== */
.card-placeholder {
    background-color: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e8e8e8;
}

.card-placeholder-inner {
    display: flex;
    padding: 12px;
    gap: 12px;
}

.card-placeholder-img {
    width: 110px;
    height: 110px;
    background-color: #e0e0e0;
    border-radius: 12px;
    flex-shrink: 0;
    animation: pulse 1.5s ease-in-out infinite;
}

.card-placeholder-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.card-placeholder-line {
    height: 14px;
    background-color: #e0e0e0;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
}

.card-placeholder-line.short {
    width: 40%;
}

.card-placeholder-line.medium {
    width: 70%;
}

.card-placeholder-line.long {
    width: 90%;
}

.card-placeholder-status {
    height: 42px;
    background-color: #e0e0e0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Hide placeholders when loaded */
.outlet-cards.loaded .card-placeholder {
    display: none;
}

/* ==================== */
/* RESPONSIVE           */
/* ==================== */
@media (max-width: 400px) {
    .header-title {
        font-size: 24px;
    }
    
    .header-subtitle {
        font-size: 11px;
    }
    
    .toggle-text span {
        font-size: 13px;
    }
    
    .toggle-wrapper {
        padding-right: 75px;
    }
    
    .kurir-img {
        width: 80px;
    }
    
    .card-image {
        width: 95px;
        height: 95px;
    }
    
    .card-name {
        font-size: 16px;
    }
    
    .card-address {
        font-size: 13px;
    }
}

/* ==================== */
/* ANIMATIONS           */
/* ==================== */
.outlet-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardEntrance 0.4s ease forwards;
}

.outlet-card:nth-child(1) {
    animation-delay: 0.1s;
}

.outlet-card:nth-child(2) {
    animation-delay: 0.2s;
}

.outlet-card:nth-child(3) {
    animation-delay: 0.3s;
}

.outlet-card:nth-child(4) {
    animation-delay: 0.4s;
}

.outlet-card:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== */
/* LOADING OVERLAY      */
/* ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.radar-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.radar-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid rgba(76, 175, 80, 0.6);
    animation: radarPulse 2s ease-out infinite;
}

.radar-wave:nth-child(1) {
    animation-delay: 0s;
}

.radar-wave:nth-child(2) {
    animation-delay: 0.5s;
}

.radar-wave:nth-child(3) {
    animation-delay: 1s;
}

@keyframes radarPulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.loading-kurir {
    width: 100px;
    height: auto;
    z-index: 2;
    animation: kurirBounce 1s ease-in-out infinite;
}

@keyframes kurirBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.loading-text {
    font-family: 'Myriad Pro', Arial, sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.5px;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* ==================== */
/* TOGGLE BUTTON EFFECTS */
/* ==================== */
@keyframes subtlePress {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.98);
    }
}

@keyframes glareShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 150%;
    }
}
