/**
 * Product Delivery Service - Frontend Styles
 * Version: 1.0.5
 */

/* ========================================
   PRODUCT PAGE STYLES
   ======================================== */

.product-delivery-service-container {
    margin: 20px 0;
    animation: fadeIn 0.3s ease-in;
}
.order-confirmation-table .order-line,
.order-confirmation-table tr {
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-confirmation-table .order-line .col-sm-2,
.order-confirmation-table .order-line .col-xs-3,
.order-confirmation-table tr td:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
}
.delivery-service-box {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.delivery-service-box:hover {
    border-color: #25b9d7;
    box-shadow: 0 2px 8px rgba(37, 185, 215, 0.2);
}

/* ========================================
   CART PAGE TOGGLE STYLES
   ======================================== */

.delivery-service-switch-container {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e8e8e8;
    transition: opacity 0.3s ease;
}

/* PrestaShop-style toggle switch */
.ps-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.ps-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ps-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

.ps-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ps-switch input:checked + .ps-switch-slider {
    background-color: #25b9d7;
}

.ps-switch input:focus + .ps-switch-slider {
    box-shadow: 0 0 1px #25b9d7;
}

.ps-switch input:checked + .ps-switch-slider:before {
    transform: translateX(20px);
}

.ps-switch input:disabled + .ps-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Label styling */
.delivery-service-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: #555;
    transition: color 0.2s ease;
}

.delivery-service-label:hover {
    color: #25b9d7;
}

.delivery-service-icon {
    margin-right: 5px;
    font-size: 16px;
}

.delivery-service-price {
    color: #25b9d7;
    font-weight: 600;
    font-size: 14px;
    margin-left: auto;
    padding-left: 10px;
}

/* ========================================
   CHECKBOX STYLES (Product Page)
   ======================================== */

.delivery-service-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-right: 10px;
}

.delivery-service-checkbox:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.delivery-service-checkbox:checked {
    accent-color: #25b9d7;
}

/* ========================================
   LABEL STYLES
   ======================================== */

.delivery-service-box label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

.delivery-service-checkbox:disabled + label {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ========================================
   TEXT STYLES
   ======================================== */

.delivery-service-box strong {
    font-size: 15px;
    color: #333;
}

.delivery-service-box small {
    display: block;
    margin-top: 3px;
    color: #666;
    font-size: 12px;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .delivery-service-box {
        padding: 12px;
        margin: 10px 0;
    }

    .delivery-service-box strong {
        font-size: 14px;
    }

    .delivery-service-box small {
        font-size: 11px;
    }

    .delivery-service-label {
        font-size: 13px;
    }

    .delivery-service-price {
        font-size: 13px;
    }

    .ps-switch {
        width: 40px;
        height: 22px;
    }

    .ps-switch-slider:before {
        height: 16px;
        width: 16px;
    }

    .ps-switch input:checked + .ps-switch-slider:before {
        transform: translateX(18px);
    }
}

@media (max-width: 480px) {
    .delivery-service-box label {
        flex-direction: column;
        align-items: flex-start;
    }

    .delivery-service-label {
        flex-wrap: wrap;
    }

    .delivery-service-price {
        margin-left: 54px;
        padding-left: 0;
    }
}