/**
 * BOW Fulfillment Indicator Styles
 * Color scheme: Dark Blue (#1D3A70) and White
 */

/* ===========================
   Fulfillment Indicator Card
   =========================== */

.bow-fulfillment-indicator {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.bow-fulfillment-indicator__card {
    background: #ffffff;
    border: 2px solid #1D3A70;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(29, 58, 112, 0.1);
    transition: box-shadow 0.3s ease;
}

.bow-fulfillment-indicator__card:hover {
    box-shadow: 0 4px 12px rgba(29, 58, 112, 0.15);
}

/* Header Section */
.bow-fulfillment-indicator__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.bow-fulfillment-indicator__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #1D3A70;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bow-fulfillment-indicator__icon svg {
    width: 24px;
    height: 24px;
}

.bow-fulfillment-indicator__title {
    flex: 1;
}

.bow-fulfillment-indicator__label {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
    font-weight: 600;
}

.bow-fulfillment-indicator__type {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #1D3A70;
    line-height: 1.3;
}

/* Details Section */
.bow-fulfillment-indicator__details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bow-fulfillment-indicator__store-info {
    background: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #1D3A70;
}

.bow-fulfillment-indicator__store-name {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #1D3A70;
    margin-bottom: 6px;
}

.bow-fulfillment-indicator__store-address {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin-bottom: 6px;
}

.bow-fulfillment-indicator__store-hours {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.bow-fulfillment-indicator__hours-label {
    font-weight: 600;
    color: #1D3A70;
    margin-right: 4px;
}

.bow-fulfillment-indicator__timeframe {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
    background: #f0f4f8;
    padding: 10px 12px;
    border-radius: 6px;
}

.bow-fulfillment-indicator__timeframe svg {
    width: 16px;
    height: 16px;
    color: #1D3A70;
    flex-shrink: 0;
}

.bow-fulfillment-indicator__timeframe strong {
    color: #1D3A70;
    font-weight: 600;
}

/* Actions Section */
.bow-fulfillment-indicator__actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.bow-fulfillment-indicator__change-btn {
    background: transparent;
    color: #1D3A70;
    border: 2px solid #1D3A70;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.bow-fulfillment-indicator__change-btn:hover {
    background: #1D3A70;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(29, 58, 112, 0.2);
}

.bow-fulfillment-indicator__change-btn:active {
    transform: translateY(0);
}

.bow-fulfillment-indicator__change-btn svg {
    width: 14px;
    height: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .bow-fulfillment-indicator__card {
        padding: 16px;
    }

    .bow-fulfillment-indicator__header {
        flex-direction: row;
    }

    .bow-fulfillment-indicator__type {
        font-size: 16px;
    }

    .bow-fulfillment-indicator__timeframe {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* ===========================
   Modal Styles
   =========================== */

.bow-fulfillment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.bow-fulfillment-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.bow-fulfillment-modal__content {
    position: relative;
    background: #ffffff;
    max-width: 600px;
    margin: 50px auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
    max-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.bow-fulfillment-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 2px solid #1D3A70;
}

.bow-fulfillment-modal__header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #1D3A70;
}

.bow-fulfillment-modal__close {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
    transition: color 0.2s ease;
}

.bow-fulfillment-modal__close:hover {
    color: #1D3A70;
}

.bow-fulfillment-modal__close svg {
    width: 24px;
    height: 24px;
}

.bow-fulfillment-modal__body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.bow-fulfillment-modal__notice {
    background: #fef3c7;
    border: 1px solid #fbbf24;
    color: #92400e;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.bow-fulfillment-modal__options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.bow-fulfillment-option {
    position: relative;
}

.bow-fulfillment-option__label {
    display: block;
    cursor: pointer;
}

.bow-fulfillment-option__label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bow-fulfillment-option__content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.bow-fulfillment-option__label input[type="radio"]:checked ~ .bow-fulfillment-option__content {
    border-color: #1D3A70;
    background: #f0f4f8;
    box-shadow: 0 0 0 3px rgba(29, 58, 112, 0.1);
}

.bow-fulfillment-option__label:hover .bow-fulfillment-option__content {
    border-color: #1D3A70;
}

.bow-fulfillment-option__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #1D3A70;
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bow-fulfillment-option__icon svg {
    width: 32px;
    height: 32px;
}

.bow-fulfillment-option__details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bow-fulfillment-option__details strong {
    font-size: 16px;
    font-weight: 700;
    color: #1D3A70;
}

.bow-fulfillment-option__details span {
    font-size: 14px;
    color: #6b7280;
}

.bow-fulfillment-modal__store-selector {
    margin-top: 20px;
}

.bow-fulfillment-modal__store-selector label {
    display: block;
    margin-bottom: 8px;
    color: #1D3A70;
    font-size: 14px;
}

.bow-store-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.bow-store-select:focus {
    outline: none;
    border-color: #1D3A70;
    box-shadow: 0 0 0 3px rgba(29, 58, 112, 0.1);
}

.bow-fulfillment-modal__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
}

.bow-fulfillment-modal__cancel,
.bow-fulfillment-modal__confirm {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.bow-fulfillment-modal__cancel {
    background: #e5e7eb;
    color: #4b5563;
}

.bow-fulfillment-modal__cancel:hover {
    background: #d1d5db;
}

.bow-fulfillment-modal__confirm {
    background: #1D3A70;
    color: #ffffff;
}

.bow-fulfillment-modal__confirm:hover {
    background: #152a50;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(29, 58, 112, 0.3);
}

.bow-fulfillment-modal__confirm:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bow-fulfillment-modal__content {
        margin: 20px;
        max-height: calc(100vh - 40px);
    }

    .bow-fulfillment-modal__header,
    .bow-fulfillment-modal__body,
    .bow-fulfillment-modal__footer {
        padding: 16px;
    }

    .bow-fulfillment-modal__options {
        gap: 8px;
    }

    .bow-fulfillment-option__content {
        padding: 12px;
        gap: 12px;
    }

    .bow-fulfillment-option__icon {
        width: 40px;
        height: 40px;
    }

    .bow-fulfillment-option__icon svg {
        width: 24px;
        height: 24px;
    }

    .bow-fulfillment-modal__footer {
        flex-direction: column;
        gap: 8px;
    }

    .bow-fulfillment-modal__cancel,
    .bow-fulfillment-modal__confirm {
        width: 100%;
    }
}

/* Prevent body scroll when modal is open */
body.bow-fulfillment-modal-open {
    overflow: hidden;
}

/* WooCommerce Notice Styles in Modal */
.bow-fulfillment-modal__body .woocommerce-error,
.bow-fulfillment-modal__body .woocommerce-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: 6px;
}

.bow-fulfillment-modal__body .woocommerce-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.bow-fulfillment-modal__body .woocommerce-message {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

/* Mini-cart specific styles */
.bow-fulfillment-indicator--minicart .bow-fulfillment-indicator__card {
    padding: 16px;
    margin: 0 0 16px 0;
}

.bow-fulfillment-indicator--minicart .bow-fulfillment-indicator__type {
    font-size: 16px;
}

.bow-fulfillment-indicator--minicart .bow-fulfillment-indicator__store-name {
    font-size: 14px;
}

.bow-fulfillment-indicator--minicart .bow-fulfillment-indicator__store-address {
    font-size: 13px;
}

/* Checkout specific styles */
.bow-fulfillment-indicator--checkout {
    margin-bottom: 20px;
}

.bow-fulfillment-indicator--checkout .bow-fulfillment-indicator__card {
    background: #f9fafb;
}
