
@media print {
    body * { visibility: hidden; }
    #printable-label, #printable-label * { visibility: visible; }
    #printable-label { position: absolute; left: 0; top: 0; width: 100%; border: none !important; }
    .print-btn, .wpcig-search-form { display: none !important; }
}

/* Interface Design */
.wpcig-wrapper { max-width: 800px; margin: 40px auto; font-family: 'Segoe UI', sans-serif; }
.wpcig-card { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.1); border: 1px solid #eee; }
.wpcig-header { text-align: center; margin-bottom: 25px; }
.wpcig-header i { font-size: 40px; color: #e53935; margin-bottom: 10px; }
.wpcig-header h2 { margin: 0; color: #333; }

.input-group { display: flex; gap: 10px; }
.input-group input { flex: 1; padding: 12px 20px; border: 2px solid #ddd; border-radius: 8px; font-size: 16px; outline: none; }
.input-group input:focus { border-color: #e53935; }
.input-group button { padding: 0 30px; background: #e53935; color: #fff; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* TCS Label Design */
.tcs-label { background: #fff; margin-top: 30px; }
.tcs-table { width: 100%; border-collapse: collapse; border: 2px solid #000; }
.tcs-table td { border: 1px solid #000; padding: 8px; vertical-align: top; }
.tcs-red { color: #d32f2f; font-size: 28px; font-weight: bold; font-style: italic; }
.tcs-barcode-box { text-align: center; width: 40%; }
.tcs-meta-box { font-size: 11px; padding: 0 !important; width: 35%; }
.tcs-meta-box .row { border-bottom: 1px solid #000; padding: 3px 8px; }
.tcs-meta-box .split { display: flex; justify-content: space-between; }
.tcs-head { background: #eeeeee; font-weight: bold; text-align: center; font-size: 12px; }
.tcs-address { height: 90px; font-size: 13px; }
.tcs-cod-row { display: flex; padding: 0 !important; height: 100%; }
.cod-label { background: #eee; padding: 15px; font-weight: bold; border-right: 1px solid #000; width: 30%; }
.cod-val { flex: 1; font-size: 22px; font-weight: bold; text-align: center; align-self: center; }
.tcs-footer { font-size: 10px; font-style: italic; background: #f9f9f9; }

/* Buttons */
.label-actions { display: flex; gap: 15px; margin-top: 20px; }
.btn-print, .btn-download { flex: 1; padding: 15px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; color: #fff; }
.btn-print { background: #2196F3; }
.btn-download { background: #4CAF50; }

/* Print Mode */
@media print {
    body * { visibility: hidden; }
    #tcs-label, #tcs-label * { visibility: visible; }
    #tcs-label { position: absolute; left: 0; top: 0; width: 100%; }
}



/* Main wrapper */
.wpcig-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Search card */
.wpcig-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.wpcig-header {
    background: #f5f5f5;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    border-bottom: 2px solid #ddd;
}

.wpcig-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.wpcig-header i {
    margin-right: 10px;
    color: #0073aa;
}

#wpcig-search-form {
    padding: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.input-group input:focus {
    border-color: #0073aa;
    outline: none;
}

.input-group button {
    padding: 12px 30px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.input-group button:hover {
    background: #005a87;
}

/* Label Preview */
.label-preview-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* TCS Main Label - Table Format */
.tcs-main-label {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px;
    border: 2px solid #000;
    padding: 10px;
    background: white;
}

.tcs-inner-table {
    width: 100%;
    border-collapse: collapse;
}

.tcs-inner-table td {
    border: 1px solid #000;
    padding: 8px;
}

/* Column widths */
.col-logo {
    width: 25%;
    text-align: center;
}

.col-barcode {
    width: 40%;
    text-align: center;
}

.col-meta {
    width: 35%;
}

/* Header styles */
.th-gray {
    background: #e0e0e0;
    font-weight: bold;
    text-align: center;
    padding: 8px;
}

/* Address styles */
.td-address {
    vertical-align: top;
    line-height: 1.4;
    font-size: 13px;
}

/* Special fields */
.td-spec {
    text-align: center;
    font-size: 13px;
}

/* COD section */
.cod-container {
    background: #f0f0f0;
    text-align: center;
    padding: 8px;
}

.cod-label {
    font-weight: bold;
    font-size: 14px;
}

.cod-value {
    font-size: 18px;
    font-weight: bold;
    color: #c00;
}

/* Note section */
.td-note {
    font-size: 11px;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Barcode text */
.trk-text {
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
}

.consignee-text {
    font-size: 12px;
    color: #444;
}

/* Meta items */
.meta-item {
    font-size: 12px;
    padding: 2px 0;
}

/* Action buttons */
.action-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.btn-print, .btn-download {
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-print {
    background: #28a745;
    color: white;
}

.btn-print:hover {
    background: #218838;
}

.btn-download {
    background: #0073aa;
    color: white;
}

.btn-download:hover {
    background: #005a87;
}

.btn-print i, .btn-download i {
    margin-right: 8px;
}

/* Print styles */
@media print {
    .wpcig-wrapper {
        padding: 0;
    }
    
    .wpcig-card {
        display: none;
    }
    
    .action-row {
        display: none;
    }
    
    .label-preview-wrapper {
        padding: 0;
        box-shadow: none;
    }
    
    .tcs-main-label {
        border: 2px solid #000;
    }
}