/**
 * Delivery Schedule CSS
 */

/* Font - Only for our plugin elements */
.fas-delivery-scheduling,
.fas-delivery-scheduling *,
.fas-address-view,
.fas-address-view *,
.fas-modal-content,
.fas-modal-content *,
.fas-address-card,
.fas-address-card *,
.fas-address-form,
.fas-address-form * {
    font-family: 'IRANSansWeb_FaNum_Light', Arial, sans-serif !important;
}

/* Don't override icon fonts and preserve original font families */
i[class*="fa-"],
.fa,
.fas,
.far,
.fal,
.fab,
[class*="icon-"],
.elementor-icon,
.eicon,
.elementor-icon i,
.elementor-button-icon,
.elementor-widget-icon i,
[class*="fontawesome"],
[data-elementor-type] i[class*="fa"],
.elementor-element i[class*="fa"] {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", "FontAwesome", inherit !important;
    font-weight: 900 !important;
}

/* Ensure Elementor icons work properly */
.elementor-icon-list-icon i,
.elementor-social-icon i,
.elementor-button .elementor-button-icon {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands", "FontAwesome", inherit !important;
}

/* Reset font-family for all icon elements to prevent override */
body i[class*="fa-"],
body .fa,
body .fas,
body .far,
body .fal,
body .fab {
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
}

body .far {
    font-weight: 400 !important;
}

body .fal {
    font-weight: 300 !important;
}

body .fab {
    font-family: "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

/* Notification styles - Minimal */
.fas-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 16px;
    border-radius: 4px;
    color: white;
    font-weight: 400;
    z-index: 999999;
    max-width: 300px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    line-height: 1.3;
    animation: fadeIn 0.2s ease-out;
    font-family: 'IRANSansWeb_FaNum_Light', Arial, sans-serif !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fas-notification.success {
    background-color: #28a745;
}

.fas-notification.error {
    background-color: #dc3545;
}

.fas-notification.warning {
    background-color: #ffc107;
    color: #212529;
}

.fas-notification.info {
    background-color: #17a2b8;
}

/* Multiple notifications stacking */
.fas-notification:nth-child(n+2) {
    top: calc(20px + (60px * var(--notification-index, 0)));
}

/* Fade out animation */
.fas-notification.fade-out {
    animation: fadeOut 0.2s ease-in forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Cursor pointer to indicate clickable */
.fas-notification {
    cursor: pointer;
}

/* Address view section */
.fas-address-view {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.fas-address-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.fas-delivery-to {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.fas-btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.fas-btn-secondary:hover {
    background-color: #5a6268;
}

/* Delivery scheduling section */
.fas-delivery-scheduling {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.fas-delivery-scheduling h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    color: #0A74DA;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Shipping Info Box */
.fas-shipping-info-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    border: 2px solid #0EAD69;
    box-shadow: 0 2px 10px rgba(14, 173, 105, 0.1);
}

.fas-shipping-destination {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #2C2626;
    margin-bottom: 15px;
}

.fas-shipping-destination .fas-icon {
    color: #0A74DA;
    flex-shrink: 0;
}

.fas-shipping-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #DEDEDE;
}

.fas-cost-label {
    font-size: 14px;
    color: #555555;
}

.fas-cost-amount {
    font-size: 18px;
    font-weight: 700;
    color: #0A74DA;
}

.fas-shipping-free-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0EAD69 0%, #0c8f57 100%);
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    margin-top: 15px;
}

.fas-shipping-free-badge .fas-icon {
    flex-shrink: 0;
}

/* Free Shipping Progress Bar */
.fas-free-shipping-progress {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #DEDEDE;
}

.fas-progress-header {
    margin-bottom: 15px;
}

.fas-progress-text {
    font-size: 14px;
    color: #555555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fas-progress-text strong {
    color: #0A74DA;
    font-size: 16px;
}

.fas-progress-text.fas-progress-complete {
    color: #0EAD69;
    font-weight: 600;
    font-size: 15px;
}

.fas-progress-text.fas-progress-complete .fas-icon {
    color: #0EAD69;
}

.fas-progress-bar-container {
    position: relative;
    width: 100%;
    height: 30px;
    background: #DEDEDE;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.fas-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0A74DA 0%, #0EAD69 100%);
    border-radius: 15px;
    transition: width 0.6s ease;
    position: relative;
    overflow: hidden;
}

.fas-progress-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.fas-progress-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0EAD69;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.fas-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555555;
}

.fas-progress-start {
    font-weight: 600;
}

.fas-progress-end {
    font-weight: 600;
    color: #0EAD69;
}

/* Delivery dates */
.fas-delivery-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.fas-delivery-date-item {
    flex: 1;
    min-width: 100px;
    max-width: 150px;
    padding: 15px 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fas-delivery-date-item:hover {
    border-color: #aaa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fas-delivery-date-item.selected {
    border-color: #4CAF50;
    background-color: #E8F5E9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fas-date-day {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.fas-date-number {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.fas-date-month {
    font-size: 12px;
    color: #666;
}

/* Time slots */
.fas-delivery-time-slots {
    margin-top: 20px;
}

.fas-delivery-time-slots h4 {
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.fas-time-slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.fas-time-slot-item {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fas-time-slot-item:hover {
    border-color: #aaa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fas-time-slot-item.selected {
    border-color: #4CAF50;
    background-color: #E8F5E9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.fas-time-slot-name {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.fas-time-slot-description {
    font-size: 12px;
    color: #666;
}

/* Address view */
.fas-address-view {
    margin-bottom: 30px;
}

.fas-view-address-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

.fas-address-details {
    margin-bottom: 20px;
}

.fas-address-details p {
    margin-bottom: 10px;
}

/* Hide billing fields */
.fas-hidden-field,
.woocommerce-billing-fields .fas-hidden-field {
    display: none !important;
}

/* Hide billing fields section title */
.woocommerce-billing-fields h3 {
    display: none !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .fas-address-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .fas-delivery-to {
        font-size: 14px;
    }
    
    .fas-delivery-date-item {
        min-width: 80px;
        padding: 10px 5px;
    }
    
    .fas-time-slot-item {
        min-width: 120px;
    }
    
    .fas-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }
}
