/**
 * WooCommerce Amount Discount - Frontend Styles
 * Modern Navy Blue Design with Enhanced Mobile Experience
 */

/* ========================
   Amount Discount Box
   ======================== */

.wad-discount-box {
    background: transparent;
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 6px;
    margin: 16px 0;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wad-discount-box:hover {
    transform: none;
    border-color: rgba(30, 58, 138, 0.35);
    box-shadow: none;
    background: rgba(30, 58, 138, 0.02);
}

/* Header */
.wad-box-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border-bottom: 1px solid rgba(30, 58, 138, 0.15);
}

.wad-icon {
    color: rgba(30, 58, 138, 0.6);
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.wad-discount-box:hover .wad-icon {
    transform: none;
    color: rgba(30, 58, 138, 0.8);
}

.wad-header-text {
    color: rgba(30, 58, 138, 0.7);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Tiers Container */
.wad-tiers {
    padding: 4px;
    background: transparent;
}

/* Individual Tier */
.wad-tier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    margin: 2px;
    background: transparent;
    border: 1px solid rgba(30, 58, 138, 0.15);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.wad-tier::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(30, 58, 138, 0.3);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wad-tier:hover {
    transform: none;
    border-color: rgba(30, 58, 138, 0.25);
    box-shadow: none;
    background: rgba(30, 58, 138, 0.02);
}

.wad-tier:hover::before {
    transform: scaleY(1);
}

/* Unlocked tier */
.wad-tier-unlocked {
    background: rgba(30, 58, 138, 0.02);
    border-color: rgba(30, 58, 138, 0.25);
}

/* Active tier */
.wad-tier-active {
    background: rgba(30, 58, 138, 0.05);
    border: 1px solid rgba(30, 58, 138, 0.4);
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.1);
}

.wad-tier-active::before {
    transform: scaleY(1);
    width: 3px;
    background: rgba(30, 58, 138, 0.6);
}

/* Left Side */
.wad-tier-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.wad-tier-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 4px;
    color: rgba(30, 58, 138, 0.6);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.wad-tier-unlocked .wad-tier-icon {
    background: rgba(5, 150, 105, 0.05);
    border-color: rgba(5, 150, 105, 0.3);
    color: rgba(5, 150, 105, 0.8);
}

.wad-tier-active .wad-tier-icon {
    background: rgba(30, 58, 138, 0.1);
    border-color: rgba(30, 58, 138, 0.4);
    color: rgba(30, 58, 138, 0.9);
}

.wad-tier-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.wad-tier-label {
    font-size: 12px;
    font-weight: 600;
    color: #1e3a8a;
    line-height: 1.2;
}

.wad-tier-amount {
    font-size: 10px;
    font-weight: 500;
    color: rgba(30, 58, 138, 0.6);
    line-height: 1.2;
}

/* Right Side */
.wad-tier-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.wad-discount-tag {
    display: inline-block;
    padding: 3px 6px;
    background: transparent;
    border: 1px solid rgba(30, 58, 138, 0.25);
    color: rgba(30, 58, 138, 0.8);
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    box-shadow: none;
    transition: all 0.3s ease;
}

.wad-tier-active .wad-discount-tag {
    background: rgba(30, 58, 138, 0.05);
    border-color: rgba(30, 58, 138, 0.4);
    color: rgba(30, 58, 138, 0.95);
}

.wad-amount-needed {
    font-size: 9px;
    font-weight: 600;
    color: rgba(239, 68, 68, 0.7);
    padding: 2px 5px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 3px;
    white-space: nowrap;
}

/* Footer */
.wad-box-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 10px;
    background: transparent;
    border-top: 1px solid rgba(30, 58, 138, 0.1);
}

.wad-active-discount {
    background: rgba(5, 150, 105, 0.03);
    border-top-color: rgba(5, 150, 105, 0.2);
}

.wad-footer-icon {
    color: rgba(30, 58, 138, 0.5);
    flex-shrink: 0;
    width: 11px;
    height: 11px;
}

.wad-active-discount .wad-footer-icon {
    color: rgba(5, 150, 105, 0.7);
}

.wad-box-footer span {
    font-size: 9px;
    color: rgba(30, 58, 138, 0.6);
    font-weight: 500;
    letter-spacing: 0.1px;
}

.wad-active-discount span {
    color: rgba(5, 150, 105, 0.8);
    font-weight: 600;
}

/* ========================
   Mini Cart Discount
   ======================== */

.wad-mini-cart-discount {
    padding: 8px 10px;
    margin: 8px 10px;
    background: transparent;
    border: 1px solid rgba(30, 58, 138, 0.2);
    border-radius: 4px;
    box-shadow: none;
}

.wad-mini-cart-title {
    font-size: 11px;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wad-mini-cart-title svg {
    width: 12px;
    height: 12px;
}

.wad-discount-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid rgba(30, 58, 138, 0.15);
}

.wad-discount-line:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.wad-discount-line:first-child {
    padding-top: 0;
}

.wad-discount-label {
    font-size: 11px;
    font-weight: 600;
    color: #1e3a8a;
    line-height: 1.3;
}

.wad-discount-amount {
    font-size: 13px;
    font-weight: 800;
    color: #1e3a8a;
    line-height: 1;
}

/* ========================
   Tablet Responsive
   ======================== */

@media screen and (max-width: 1024px) and (min-width: 769px) {
    .wad-discount-box {
        margin: 12px 0;
    }

    .wad-tier {
        padding: 6px 8px;
    }
}

/* ========================
   Mobile Responsive
   ======================== */

@media screen and (max-width: 768px) {
    .wad-discount-box {
        margin: 10px 0;
    }

    .wad-tier {
        padding: 5px 6px;
        gap: 6px;
    }

    .wad-tier-icon {
        min-width: 26px;
        height: 26px;
    }

    .wad-tier-label {
        font-size: 11px;
    }

    .wad-tier-amount {
        font-size: 9px;
    }

    .wad-discount-tag {
        font-size: 10px;
        padding: 2px 5px;
    }

    .wad-amount-needed {
        font-size: 8px;
    }
}

/* ========================
   Small Mobile
   ======================== */

@media screen and (max-width: 480px) {
    .wad-discount-box {
        margin: 8px 0;
    }

    .wad-tier {
        padding: 4px 5px;
        gap: 5px;
    }

    .wad-tier-icon {
        min-width: 24px;
        height: 24px;
    }

    .wad-tier-label {
        font-size: 10px;
    }

    .wad-tier-amount {
        font-size: 8px;
    }

    .wad-discount-tag {
        font-size: 9px;
        padding: 2px 4px;
    }
}

/* ========================
   Touch-Friendly Enhancements
   ======================== */

@media (hover: none) and (pointer: coarse) {
    .wad-tier {
        min-height: 48px;
        cursor: pointer;
    }

    .wad-tier:active {
        transform: scale(0.98);
        background: rgba(30, 58, 138, 0.1);
    }
}

/* ========================
   Accessibility
   ======================== */

@media (prefers-reduced-motion: reduce) {
    .wad-discount-box,
    .wad-tier,
    .wad-tier-icon,
    .wad-discount-tag {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    .wad-discount-box {
        border-width: 2px;
    }

    .wad-tier {
        border-width: 2px;
    }

    .wad-discount-tag,
    .wad-amount-needed {
        border: 1px solid currentColor;
    }
}
