/**
 * Custom Ecommerce Flow - Custom Cart Panel Styles
 * Redesigned based on new image (input_file_0.png) and updated HTML structure.
 * Handles layout, gradients, responsiveness, alignment, and image size.
 *
 * @version 1.9.67 (CSS Update for Final Cart Layout)
 */

/* ==========================================================================
   3. Custom Cart Panel Styles (Final Redesign)
   ========================================================================== */

/* --- 3.1 Wrapper --- */
.cef-custom-cart-panel-wrapper {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    color: #ccc; /* Light grey text */
    background-color: transparent; /* Slightly lighter dark background */
    border: none;
    border-radius: 0;
    box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

/* --- 3.2 Header --- */
.cef-cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; /* Increased margin */
    padding-bottom: 15px;
    border-bottom: 2px solid #ffc107; /* Orange separator line */
}

/* Title ("Selected Panels") */
.cef-cart-panel-header h2 {
    margin: 0;
    font-size: 1.8em;
    color: #fff;
    font-weight: 600;
	max-width: 48%;
}

/* Header Action Buttons Container */
.cef-cart-panel-actions {
    display: flex;
    align-items: center;
    gap: 15px;
	max-width: 48%;
}

/* Clear All Button (Text Link) */
.cef-cart-panel-actions a.cef-clear-all-link { /* Target specific class from shortcode */
    color: #ff8a96;
    text-decoration: none;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9em;
    transition: color 0.2s ease;
    cursor: pointer;
}
.cef-cart-panel-actions a.cef-clear-all-link:hover {
    color: #f04e60;
}

/* Add More Button (Gradient) */
.cef-cart-panel-actions a.cef-add-more-button { /* Target specific class from shortcode */
    display: inline-block;
    background-image: linear-gradient(to bottom, #ffc107, #ee8d00);
    background-color: #ffc107;
    border: none;
    color: black;
    padding: 8px 20px;
    border-radius: 100em; /* Fully rounded */
    font-weight: 600;
    font-size: 0.9em;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    line-height: normal;
}
.cef-cart-panel-actions a.cef-add-more-button:hover {
    background-image: linear-gradient(to bottom, #e0a800, #d39e00);
    background-color: #e0a800;
    color: black;
}


/* --- 3.3 Items List --- */
.cef-cart-panel-items {
    margin-top: 30px;
    margin-bottom: 30px;
    display: grid;
    gap: 25px; /* Space between items */
}

/* --- 3.4 Individual Item Container --- */
.cef-cart-panel-item {
    background-color: #1C1C1C; /* Dark item background */
    border-radius: 10px; /* Rounded corners */
    padding: 15px 20px; /* Adjusted padding */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reduced gap between top/bottom rows */

    /* Gradient Border using background-clip */
    border: 2px solid transparent;
    background: linear-gradient(#1C1C1C, #1C1C1C) padding-box, /* Inner background */
                linear-gradient(to bottom, #ffc107, #ee8d00) border-box; /* Outer border */
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
}

/* --- 3.5 Top Row (Image, Details, Price) --- */
.cef-item-top-row {
    display: flex;
    align-items: flex-start; /* Align items to top */
    gap: 15px; /* Reduced gap */
	flex-direction: row;
    flex-wrap: wrap;
}

/* --- 3.5.1 Thumbnail --- */
.cef-item-thumb {
    flex-shrink: 0;
    align-self: center;
	width: 16%;
}
.cef-item-thumb img {
    max-width: 60px; /* Reduced image size */
    height: auto;
    border-radius: 10px !important;
    display: block;
}

/* --- 3.5.2 Details (Includes Input Coin now) --- */
.cef-item-details {
    flex-grow: 1; /* Takes available space */
    display: flex;
    flex-direction: column;
    gap: 4px; /* Reduced gap between text lines */
    align-self: center; /* Center details vertically */
}
.cef-item-details h3.cef-item-title {
    margin: 0 0 2px 0; /* Adjust margin */
    font-size: 1em; /* Slightly smaller title */
    color: white;
    font-weight: 600;
    line-height: 1.3;
}
.cef-item-meta {
    font-size: 0.85em; /* Smaller meta text */
	font-weight: 600;
	text-transform: capitalize;
   color: #c1c1c1;
    margin: 0;
    line-height: 1.2;
}
.cef-item-meta strong {
    color: white;
    margin-right: 5px;
    font-weight: 500;
}
/* Remove separator line, input coin is now part of details */
/* hr.cef-item-separator { display: none; } */
.cef-item-meta.cef-item-input-coin {
    /* Styles inherited from .cef-item-meta */
}

/* --- 3.5.3 Pricing --- */
.cef-item-pricing {
    flex-shrink: 0;
    text-align: right;
    align-self: center; /* Center vertically */
}
.cef-item-payable-label {
    font-size: 1em; /* Smaller label */
    color: white;
    margin: 0 0 3px 0;
    text-transform: uppercase;
	font-weight: 600;
}
.cef-item-payable-amount .amount{
    font-size: 1.3em; /* Adjust price size */
    font-weight: 700;
    margin: 0;
    display: inline-block;
    /* Text Gradient */
    background: linear-gradient(to bottom, #ffc107, #ee8d00) ;
    -webkit-background-clip: text ;
    background-clip: text ;
    color: transparent !important;
}
.cef-item-payable-amount .woocommerce-Price-currencySymbol {
    color: transparent;
    background: linear-gradient(to bottom, #ffc107, #ee8d00);
    -webkit-background-clip: text;
    background-clip: text;
}

/* --- 3.6 Bottom Row (Actions Only) --- */
.cef-item-bottom-row {
    display: flex;
    justify-content: flex-end; /* Align actions to the LEFT */
    align-items: center;
    padding-top: 10px; /* Space above actions */
    border-top: 1px solid #444; /* Separator line (subtle grey) */
    margin-top: 10px; /* Consistent margin */
}

/* Actions Area */
.cef-item-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.cef-item-actions .button {
    background-image: linear-gradient(to bottom, #ffc107, #ee8d00);
    background-color: #ffc107;
    border: none;
    color: black;
    padding: 6px 15px;
    border-radius: 100em;
    font-weight: 600;
    font-size: 0.8em;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    line-height: normal;
}
.cef-item-actions .button:hover {
    background-image: linear-gradient(to bottom, #ee8d00, #ffc107);
    background-color: #e0a800;
    color: black;
}

.cef-item-actions .button:focus {
    color: black !important;
}

/* --- 3.7 Cart Empty Message --- */
.cef-cart-empty { text-align: center; padding: 40px 15px; font-size: 1.1em; color: #bbb; }
.cef-cart-empty + p { 
	text-align: center; 
	display: flex !important;
	 justify-content: center;
}

.cef-cart-panel-items p a{
    border-radius: 100em;
    border: none;
    color: black;
	background-image: linear-gradient(to bottom, #ffc107, #ee8d00);
	font-weight: 700;
}

.cef-cart-panel-items p a:hover{
    border-radius: 100em;
    border: none;
    color: black;
	background-image: linear-gradient(to bottom, #ee8d00, #ffc107);
	font-weight: 700;
}
 

/* --- 3.8 Footer / Checkout Button --- */
.cef-cart-panel-footer { text-align: center; margin-top: 40px; padding-top: 20px;  }
/* Checkout Feedback Area */
#cef-checkout-feedback { margin-bottom: 15px; min-height: 1.5em; }
#cef-checkout-feedback .spinner { display: inline-block; vertical-align: middle; margin: 0 5px 0 0; }
#cef-checkout-feedback span { color: #ccc; }
#cef-checkout-feedback a { color: #ffc107; text-decoration: underline; }

/* Checkout Now Button */
.cef-checkout-button { display: inline-flex; align-items: center; justify-content: center; font-size: 1.1em !important; padding: 14px 30px !important; border: none !important; border-radius: 100em !important; background-image: linear-gradient(to bottom, #ffc107, #ee8d00) !important; background-color: #ffc107 !important; color: black !important; font-weight: 700 !important; text-decoration: none !important; cursor: pointer; transition: background 0.2s ease; line-height: normal !important; }
.cef-checkout-button:hover { background-image: linear-gradient(to bottom, #ee8d00, #ffc107) !important; background-color: #e0a800 !important; color: black !important; }
.cef-checkout-button .dashicons-cart { font-size: 1.2em; height: auto; width: auto; vertical-align: middle; margin-right: 8px; color: black !important; }

/* --- 3.9 Responsive Cart Panel --- */
@media (max-width: 768px) {
    .cef-custom-cart-panel-wrapper { padding: 20px; } /* Adjust padding */
    .cef-cart-panel-header {align-items: flex-start; gap: 15px; border-bottom-width: 2px; }
    .cef-cart-panel-header h2 { font-size: 1.5em; }
    .cef-cart-panel-actions { width: 100%; justify-content: flex-end; }

    .cef-cart-panel-item { padding: 15px; } /* Adjust padding */
    .cef-item-top-row { gap: 15px; }
    .cef-item-thumb img { max-width: 55px; } /* Smaller image */
     .cef-item-details h3.cef-item-title { font-size: 0.9em; }
     .cef-item-meta { font-size: 0.8em; } /* Smaller meta */
    .cef-item-payable-amount { font-size: 1.15em; } /* Smaller price */
     .cef-item-bottom-row { padding-top: 8px; margin-top: 8px; } /* Reduce spacing */
    .cef-item-actions .button { padding: 5px 12px; font-size: 0.75em; } /* Smaller buttons */
}

@media (max-width: 480px) {
    .cef-custom-cart-panel-wrapper { padding: 15px; }
    .cef-cart-panel-header h2 { font-size: 1.25em; }
    .cef-cart-panel-actions { gap: 10px; }
    .cef-cart-panel-actions a.cef-clear-all-link { font-size: 0.85em; }
    .cef-cart-panel-actions a.cef-add-more-button {font-size: 0.8em;
        padding: 6px 10px;
        font-weight: 700;}

    .cef-cart-panel-item { padding: 12px; }
    .cef-item-top-row { flex-wrap: wrap; gap: 30px 10px;} /* Allow wrapping */
    .cef-item-thumb { align-self: flex-start; width: 28%; }
    .cef-item-details { width: 68%; } /* Take remaining width */
    .cef-item-pricing { flex-basis: 100%; text-align: center; order: 3; padding-top: 10px; border: solid #444444; border-width: 1px 0px 0px 0px} /* Price last in top row */
     .cef-item-meta { font-size: 0.8em; } /* Even smaller meta */
     .cef-item-payable-amount { font-size: 1.1em; }
    .cef-item-bottom-row { justify-content: center; /* Align buttons right */ }
    .cef-item-actions .button { font-size: 0.7em; padding: 5px 12px; } /* Even smaller buttons */

    .cef-checkout-button { font-size: 1em !important; padding: 12px 22px !important; }
}

/* --- 3.18 Custom Alert Dialog --- */
.cef-custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cef-custom-alert-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cef-custom-alert-dialog {
    background-color: #1C1C1C;
    border-radius: 10px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    
    /* Gradient Border */
    border: 2px solid transparent;
    background: linear-gradient(#1C1C1C, #1C1C1C) padding-box,
                linear-gradient(to bottom, #ffc107, #ee8d00) border-box;
    background-clip: padding-box, border-box;
    background-origin: padding-box, border-box;
}

.cef-custom-alert-message {
    font-size: 1.1em;
    color: #ffffff;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

.cef-custom-alert-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cef-custom-alert-button {
    border: none;
    padding: 8px 22px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cef-custom-alert-button.cancel {
    background-color: #333;
    color: #ccc;
}

.cef-custom-alert-button.cancel:hover {
    background-color: #444;
}

.cef-custom-alert-button.confirm {
    background-image: linear-gradient(to bottom, #ffc107, #ee8d00);
    background-color: #ffc107;
    color: black;
}

.cef-custom-alert-button.confirm:hover {
    background-image: linear-gradient(to bottom, #ee8d00, #ffc107);
}

@media (max-width: 480px) {
    .cef-custom-alert-dialog {
        width: 85%;
        padding: 20px;
    }
    
    .cef-custom-alert-message {
        font-size: 1em;
    }
    
    .cef-custom-alert-button {
        font-size: 0.85em;
        padding: 7px 18px;
    }
}

/* ==========================================================================
   End of File
   ========================================================================== */