/* ===== CKU Upload Form — exact match to approved HTML mockup ===== */
#custom-keychain-section{
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
    margin:0 0 15px !important;
    padding:16px 18px 20px !important;
    background:#fff !important;
    border:1px solid #eaeaea !important;
    border-radius:16px !important;
    box-shadow:0 2px 6px rgba(0,0,0,0.03);
}
#custom-keychain-section *{box-sizing:border-box;}

.cku-header{margin:0 0 10px !important;}
.cku-header h3{font-size:15px !important;font-weight:800 !important;margin:0 !important;color:#111 !important;line-height:1.3 !important;}
.cku-header p{font-size:11px !important;color:#888 !important;margin:1px 0 0 !important;line-height:1.3 !important;}

.cku-upload-row{display:flex !important;gap:6px !important;margin:0 0 10px !important;width:100%;}
.cku-upload-slot{flex:1 1 0;min-width:0;position:relative;margin:0 !important;}

.cku-box{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;
    width:100%;height:75px !important;border-radius:10px;background:#eeeeee;cursor:pointer;
    transition:all .25s cubic-bezier(0.2,0.9,0.4,1);position:relative;overflow:hidden;margin:0 !important;padding:0 !important;
}
.cku-box:hover{background:#e4e4e4;}
.cku-upload-slot input[type="file"]{display:none;}

.cku-placeholder{display:flex;flex-direction:column;align-items:center;gap:3px;margin:0 !important;}
.cku-placeholder span{font-size:10px !important;font-weight:600;color:#777;margin:0 !important;line-height:1.3 !important;}

.cku-preview-img{
    position:absolute !important;top:0 !important;left:0 !important;
    width:100% !important;height:100% !important;object-fit:contain !important;
    border:1.5px solid #111;border-radius:10px;display:none;background:#eeeeee;
}
.cku-upload-slot.filled .cku-preview-img{display:block;}
.cku-upload-slot.filled .cku-placeholder{display:none;}

.cku-remove-btn{
    position:absolute;top:-4px;left:-4px;width:16px;height:16px;background:#fff;
    border:1.5px solid #111;border-radius:50%;display:none;align-items:center;justify-content:center;
    cursor:pointer;z-index:3;transition:all .15s;color:#111;box-shadow:0 1px 4px rgba(0,0,0,0.1);
}
.cku-remove-btn:hover{background:#e4e4e4;}
.cku-remove-btn svg{width:7px;height:7px;stroke:currentColor;}
.cku-upload-slot.filled .cku-remove-btn{display:flex;}

.cku-badge{
    position:absolute;bottom:2px;right:2px;width:12px;height:12px;background:#111;
    border-radius:50%;display:none;align-items:center;justify-content:center;
    box-shadow:0 1px 4px rgba(0,0,0,0.3);z-index:2;
}
.cku-badge svg{width:6px;height:6px;stroke:#fff;stroke-width:3;}
.cku-upload-slot.filled .cku-badge{display:flex;}

.cku-progress{
    position:absolute;inset:0;display:none;align-items:center;justify-content:center;
    background:rgba(255,255,255,0.85);z-index:5;border-radius:10px;
}
.cku-progress.show{display:flex;}
.cku-progress-svg{width:30px;height:30px;transform:rotate(-90deg);}
.cku-progress-bg{fill:none;stroke:#e8e8e8;stroke-width:3;}
.cku-progress-bar{
    fill:none;stroke:#111;stroke-width:3;stroke-linecap:round;
    stroke-dasharray:100.53;stroke-dashoffset:100.53;transition:stroke-dashoffset .15s linear;
}
.cku-progress-text{
    position:absolute;font-size:8.5px;font-weight:700;color:#111;
}

.cku-field-row{display:flex !important;gap:6px !important;margin:0 0 6px !important;width:100%;}
.cku-field{flex:1 1 0;min-width:0;position:relative;margin:0 !important;}

.cku-field label{
    display:inline-flex;align-items:center;gap:5px;
    font-size:10px !important;font-weight:700;color:#333;margin:0 0 3px !important;
    white-space:nowrap;line-height:1.3 !important;
}
.cku-required{color:#999;font-weight:400;}
.cku-field-error{font-size:7.5px;color:#cc0000;font-weight:500;display:none;}
.cku-field-error.show{display:inline-block;}

.cku-input-wrap{
    display:flex !important;align-items:center;border:1.3px solid #ddd !important;border-radius:8px !important;
    padding:5px 10px !important;background:#fff !important;transition:all .2s ease;width:100% !important;
    height:auto !important;box-shadow:none !important;margin:0 !important;
}
.cku-input-wrap:focus-within{border-color:#111 !important;box-shadow:0 0 0 4px rgba(0,0,0,0.05) !important;}
.cku-input-wrap input{
    border:none !important;outline:none !important;font-size:12px !important;width:100% !important;
    background:transparent !important;color:#111 !important;padding:3px 0 !important;margin:0 !important;
    height:auto !important;line-height:1.3 !important;box-shadow:none !important;min-height:0 !important;
    -webkit-appearance:none;appearance:none;
}
.cku-input-wrap input::placeholder{color:#c5c5c5 !important;font-weight:400;}
.cku-input-wrap.has-error{border-color:#cc0000 !important;animation:cku-shake 0.4s;}
@keyframes cku-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}

.cku-checklist{
    margin:6px 0 0 !important;border:1px solid #dcdcdc;border-radius:10px;padding:6px 10px !important;
    background:#f2f2f2;display:flex;flex-wrap:nowrap;gap:3px 10px;
}
.cku-check-item{display:flex;align-items:center;gap:5px;font-size:10px;color:#999;padding:2px 0 !important;margin:0 !important;transition:all .2s ease;white-space:nowrap;line-height:1.3 !important;}
.cku-check-item.done{color:#111;font-weight:600;}
.cku-check-item .cku-dot{
    width:12px;height:12px;border-radius:50%;border:1.3px solid #ccc;
    display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:all .2s;
}
.cku-check-item.done .cku-dot{background:#111;border-color:#111;}
.cku-check-item .cku-dot svg{width:6px;height:6px;stroke:#fff;display:none;}
.cku-check-item.done .cku-dot svg{display:block;}

.cku-confirm-notice{margin:10px 0 0 !important;display:flex;gap:5px;align-items:center;}
.cku-confirm-notice svg{width:12px;height:12px;color:#999;flex-shrink:0;}
.cku-confirm-notice span{font-size:9px !important;color:#999;margin:0 !important;line-height:1.3 !important;}

/* ===== Responsive scaling for tablet & desktop (base above = exact mobile mockup) ===== */
@media (min-width:600px){
    #custom-keychain-section{padding:20px 24px 24px;border-radius:18px;}
    .cku-header h3{font-size:18px;}
    .cku-header p{font-size:12.5px;}
    .cku-upload-row{gap:10px;}
    .cku-box{height:140px;border-radius:14px;}
    .cku-preview-img{border-radius:14px;}
    .cku-placeholder span{font-size:12.5px;}
    .cku-remove-btn{width:20px;height:20px;}
    .cku-remove-btn svg{width:8px;height:8px;}
    .cku-badge{width:16px;height:16px;}
    .cku-badge svg{width:8px;height:8px;}
    .cku-field-row{gap:10px;}
    .cku-field label{font-size:12px;}
    .cku-input-wrap{padding:9px 13px;}
    .cku-input-wrap input{font-size:14px;}
    .cku-checklist{padding:8px 14px;gap:5px 16px;}
    .cku-check-item{font-size:12px;}
    .cku-confirm-notice span{font-size:10.5px;}
    .cku-progress-svg{width:44px;height:44px;}
    .cku-progress-text{font-size:11px;}
}
@media (min-width:1024px){
    .cku-upload-row{gap:14px;}
    .cku-box{height:180px;}
    .cku-field-row{gap:14px;}
}

/* Cart & order details styles */

/* Label/value font style — matches the numberplate module's cart/mini-cart/
   checkout text styling exactly, so both products look consistent. */
.custom-data-label {
    color: #5f5e5e !important;
    font-weight: 600 !important;
    font-size: 11px;
}

.custom-data-value {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.whatsapp-value {
    color: #111 !important;
    text-decoration: none;
    font-weight: 600;
}

.notes-value {
    color: #111 !important;
    font-style: italic;
}

.custom-image-preview {
    margin: 6px 0;
}

.custom-image-preview img {
    max-width: 70px;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.reselect-images-button {
    display: inline-block;
    background: #000000;
    color: white !important;
    border-radius: 30px;
    padding: 7px 20px;
    font-size: 9px !important;
    text-decoration: none;
    margin-top: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.reselect-images-button:hover {
    background: #333;
}

.special-instruction-value {
    font-style: italic;
    color: #4a5568;
    margin-top: 4px;
}

.whatsapp-number-value {
    margin-top: 4px;
}

.whatsapp-link {
    color: #25D366 !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.whatsapp-link:hover {
    text-decoration: underline;
}

.special-instructions-order,
.special-instructions-admin,
.whatsapp-number-order,
.whatsapp-number-admin {
    margin-top: 12px;
    padding: 10px 15px;
    background: #f9f9ff;
    border-radius: 8px;
    border-left: 3px solid #a29bfe;
    font-size: 14px;
}

.whatsapp-number-order,
.whatsapp-number-admin {
    border-left-color: #25D366;
}

.special-instructions-order p,
.special-instructions-admin p,
.whatsapp-number-order p,
.whatsapp-number-admin p {
    margin: 0;
}

.image-management {
    margin-top: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.delete-custom-image {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    height: auto !important;
    line-height: 1.5 !important;
}

.delete-custom-image:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
}

.auto-delete-countdown {
    font-size: 12px;
    color: #6c757d;
    margin: 5px 0 0 !important;
    font-style: italic;
}

.image-deleted {
    font-style: italic;
    color: #6c757d;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #dee2e6;
}

.minicart-image-preview {
    display: flex;
    align-items: center;
    margin-top: 6px;
    font-size: 12px;
}

.minicart-image-preview span {
    font-weight: 500;
    margin-right: 5px;
    color: #4a5568;
}

.minicart-image-preview img {
    max-width: 40px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.minicart-reselect {
    margin-top: 8px;
}

.minicart-instructions,
.minicart-whatsapp {
    font-size: 12px;
    color: #4a5568;
    font-style: italic;
    margin-top: 6px;
    padding-left: 5px;
    border-left: 2px solid #e2e8f0;
}

.minicart-whatsapp {
    border-left-color: #25D366;
}

.custom-image-admin-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    max-width: 280px;
}

.admin-image-link {
    display: block;
    margin-top: 8px;
}

.custom-image-admin-preview img {
    max-width: 200px !important;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.custom-image-order-preview {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eaeaea;
    display: inline-block;
}

.image-container {
    margin-top: 8px;
}

.custom-image-order-preview img {
    max-width: 200px !important;
    height: auto;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.custom-image-preview img {
    width: auto;
    height: 40px !important;
    border-radius: 2px !important;
    border: 1px solid #ddd;
    position: absolute !important;
    left: 180px !important;
    top: 90px !important;
}
.custom-image-preview {
    position: relative;
    right: 170px;
    top: -100px;
}
.custom-image-preview {
    height: 35px;
}
.whatsapp-link-admin {
    color: #25D366 !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.whatsapp-link-admin:hover {
    text-decoration: underline;
}

.woocommerce-order .reselect-images-button,
.order-details .reselect-images-button {
    display: none !important;
}

/* ===== Front/Back image thumbnails injected into Cart & Checkout (any theme/page builder) ===== */
.cku-injected-thumb-wrap {
    display: block;
    margin-top: 6px;
}
.cku-injected-thumb {
    max-width: 54px;
    max-height: 54px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

/* ===== Mini-Cart's own image (.custom-image-preview above) hides the product
   avatar duplicate that some themes render ===== */
img.avatar.avatar-60.photo {
    display: none;
}
@media (max-width: 599px) {
    .cart-sidebar-content .mini_cart_item img {
        max-width: 60px;
        max-height: 80px;
        margin-right: 15px;
        border-radius: 10px;
    }
}
