/* ==========================================================================
   TALITOR: COUPON ERROR NOTICE (CART)
   ========================================================================== */
.woocommerce-cart .coupon-error-notice {
    display: block;
    margin-top: 15px !important;
    
    /* Visual style */
    background-color: #b81c23; /* Dark red */
    color: #ffffff;            /* White text */
    padding: 5px 10px;        /* Inner spacing */
    border-radius: 10px;        /* Rounded corners */
    font-weight: 500;
    text-align: center;        /* Optional: center text */
}

/* =========================================================
   TALITOR: BLACK CARD COUPON (V23 + 3D TEXT ONLY)
   ========================================================= */

/* --- 1. MESSAGE AREA (TOGGLE) --- */
.woocommerce-checkout .woocommerce-form-coupon-toggle {
    width: 100%;
    text-align: center;
    display: block;
    margin-bottom: 40px;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    color: #333 !important;
    display: inline-block !important;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon {
    display: block;
    margin: 0 auto 0 auto;
    background-color: #242424;
    color: #fff !important;
    padding: 8px 14px;
    border-radius: 40px;
    font-size: 10px;
    text-decoration: none !important;
    text-transform: uppercase;
    font-weight: bold;
    width: fit-content;
    transition: background 0.3s ease;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a.showcoupon:hover { 
    background-color: #444; 
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info::before { 
    display: none !important; 
}


/* --- 2. THE CARD (WITHOUT !IMPORTANT ON DIMENSIONS) --- */
#woocommerce-checkout-form-coupon {
    /* Fluid geometry for animation */
    width: 100% !important;
    max-width: 450px !important;
    box-sizing: border-box !important;
    
    /* Centering */
    margin: 0 auto 30px auto; 
    
    /* Decoration */
    border: 1px solid #333 !important;
    border-radius: 18px !important;
    box-shadow: 10px 10px 10px rgba(0,0,0,0.4) !important;
    position: relative;
    overflow: hidden; 

    /* Realistic Background (GLOSSY BLACK CARD) */
    background-image: 
        url('https://talitor-electronics.no/wp-content/uploads/2026/02/talitor_logo02.svg'),
        linear-gradient(90deg, transparent 0%, #cf9f27 20%, #ffdf80 50%, #cf9f27 80%, transparent 100%),
        linear-gradient(125deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.03) 35%, transparent 36%, transparent 100%),
        radial-gradient(circle at 0% 0%, #4a4a4a 0%, #1a1a1a 50%, #000000 100%);
    
    background-repeat: no-repeat;
    
    /* Inverted Position */
    background-position: 
        right 45px top 30px, /* Logo on the RIGHT */
        50% 100px,           /* Golden line */
        0 0,                 /* Reflection */
        0 0;                 /* Black background */
        
    /* Sizes */
    background-size: 
        140px auto, 
        85% 2px,    
        cover,      
        cover;      
    
    /* Padding */
    padding: 180px 30px 40px 30px; 
}


/* --- 3. ERROR MESSAGE --- */
#woocommerce-checkout-form-coupon .coupon-error-notice {
    position: absolute !important;
    top: 130px !important;
    left: 30px !important;
    right: 30px !important;
    width: auto !important;
    z-index: 50 !important;
    margin: 0 !important;
    
    display: block !important;
    background-color: #780005 !important;
    color: #ffffff !important;
    padding: 4px 10px !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    text-align: center !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
}


/* --- 4. "RABATTKODE" TEXT (WITH ADDED 3D EFFECT) --- */
#woocommerce-checkout-form-coupon::after {
    content: "Rabattkode";
    position: absolute;
    top: 35px;
    left: 45px; 
    color: #fff;
    font-size: 28px;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 10;
    
    /* ADDED: 3D EFFECT (Light above, Shadow below) */
    text-shadow: 
        0 -1px 1px rgba(255,255,255,0.5), /* Small top reflection */
        0 2px 4px rgba(0,0,0,0.9);        /* Drop shadow */
}


/* --- 5. INPUT & BUTTON (FLOAT LAYOUT) --- */
#woocommerce-checkout-form-coupon .form-row-first {
    float: left;
    width: 63%;
    padding: 0;
    margin: 0;
}

#woocommerce-checkout-form-coupon .form-row-last {
    float: right;
    width: 35%;
    padding: 0;
    margin: 0;
    text-align: right;
}

/* --- 6. VISUAL FIELDS STYLE (ENGRAVED METAL 3D EFFECT) --- */
#woocommerce-checkout-form-coupon input.input-text {
    background: linear-gradient(125deg, #b0b0b0 0%, #e0e0e0 20%, #808080 100%) !important;
    border: none !important;
    border-radius: 4px !important;
    height: 50px !important;
    
    /* BLACK TEXT */
    color: #111 !important; /* Deep black */
    font-weight: 800;
    text-transform: uppercase;
    font-size: 16px !important;
    padding-left: 15px !important;
    width: 100% !important;
    letter-spacing: 1px; /* Spaces letters slightly for the card effect */
    
    /* THE SECRET TO 3D ON BLACK TEXT (ENGRAVED EFFECT) */
    /* 1px of white down and right = gives the impression the text is indented */
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7) !important;
}

#woocommerce-checkout-form-coupon input.input-text::placeholder {
    color: #444 !important; /* Dark grey */
    font-weight: 800;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
    
    /* SAME EFFECT ON PLACEHOLDER */
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5) !important;
}

#woocommerce-checkout-form-coupon button.button {
    background: #660000 !important;
    color: #fff !important;
    height: 50px !important;
    width: 100% !important;
    border-radius: 30px !important;
    
    /* MODIFICATION HERE: Removed the dark border and shadow from the theme */
    border: none !important; 
    box-shadow: none !important; 
    
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 50px !important;
}

#woocommerce-checkout-form-coupon button.button:hover {
    background: #800000 !important;
    /* Ensures no shadow appears on hover */
    box-shadow: none !important; 
}


/* --- 7. MOBILE ADAPTATION --- */

/* A. STANDARD MOBILE (Up to 550px) */
@media (max-width: 550px) {
    #woocommerce-checkout-form-coupon {
        padding: 160px 20px 20px 20px; 
        background-position: right 20px top 25px, 50% 80px, 0 0, 0 0;
        background-size: 120px auto, 90% 2px, cover, cover;
    }

    #woocommerce-checkout-form-coupon .coupon-error-notice {
        top: 120px !important; 
        left: 20px !important;
        right: 20px !important;
    }

    #woocommerce-checkout-form-coupon::after {
        font-size: 22px !important;
        top: 30px !important;
        left: 20px !important;
    }
    
    #woocommerce-checkout-form-coupon button.button {
        font-size: 10px !important;
        padding: 0 5px !important;
    }
}

/* B. VERY SMALL SCREEN (Max 360px) */
@media (max-width: 360px) {
    #woocommerce-checkout-form-coupon {
        text-align: center;
        background-position: 50% 20px, 50% 90px, 0 0, 0 0;
        padding-top: 150px;
    }
    
    #woocommerce-checkout-form-coupon .coupon-error-notice {
        top: 98px !important;
    }
    
    #woocommerce-checkout-form-coupon::after { display: none; }

    /* Clean stacking */
    #woocommerce-checkout-form-coupon .form-row-first {
        float: none;
        width: 100%;
    }
    
    #woocommerce-checkout-form-coupon .form-row-last {
        float: none;
        width: 100%;
        margin-top: 10px;
    }
    
    #woocommerce-checkout-form-coupon button.button {
        font-size: 13px !important;
    }
}
