/* Modern Print Options UI */

.inkstation-flex-row {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.inkstation-flex-row .inkstation-field {
    flex: 1;
    min-width: 80px;
    margin-bottom: 10px;
}

.ink-lf-item-row {
    background: #fcfcfc;
    border: 1px solid #edeff2;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.2s ease;
}

.ink-lf-item-row:hover {
    border-color: #d1d5db;
}

.ink-lf-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: #2d3748;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 8px;
}

.ink-lf-row-header strong {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ink-remove-row {
    background: #fc8181;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    line-height: normal;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ink-remove-row:hover {
    background: #cc0000;
}

#ink-add-item-row {
    margin-top: 5px;
    background: #edf2f7;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.2s;
}

#ink-add-item-row:hover {
    background: #e2e8f0;
    border-color: #a0aec0;
}


/* Main Container */
.inkstation-options {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid #eef0f5;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3e50;
}

/* Fields & Labels */
.inkstation-field {
    margin-bottom: 24px;
}

.inkstation-field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #5a6b7c;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Custom Inputs & Select Dropdowns */
.inkstation-field select,
.inkstation-field input[type="text"],
.inkstation-field input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    color: #2c3e50;
    background-color: #f8fafc;
    border: 1px solid #dae1e7;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.inkstation-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235a6b7c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    cursor: pointer;
}

.inkstation-field select:hover,
.inkstation-field input:hover {
    border-color: #b8c2cc;
    background-color: #fff;
}

.inkstation-field select:focus,
.inkstation-field input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
    background-color: #fff;
}

.ink-field-note {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: #718096;
    font-style: italic;
}

/* Turnaround Badges */
.ink-turnaround-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* Lamination Sub-Categories (Optgroups) */
#ink_lamination optgroup {
    font-weight: 800;
    color: #000000;
    font-size: 1.1em;
}

.ink-badge {
    flex: 1;
    min-width: 150px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-align: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.ink-badge:hover {
    border-color: #cbd5e0;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
}

.ink-badge.active {
    border-color: #007cba;
    background: #f0f9ff;
    box-shadow: 0 8px 20px rgba(0, 124, 186, 0.12);
    transform: translateY(-2px);
}

.ink-badge.active::after {
    content: '';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #007cba;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.badge-days {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 6px;
}

.badge-date {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 12px;
    display: block;
}

.badge-price {
    font-size: 1rem;
    font-weight: 700;
    color: #007cba;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(0, 124, 186, 0.08);
    border-radius: 20px;
}

/* Upload Zone */
.ink-dropzone {
    border: 2px dashed #cbd5e0;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ink-dropzone.compact {
    min-height: 80px;
    padding: 15px;
    background: #fff;
}

.ink-dropzone.compact .dropzone-prompt p {
    margin: 5px 0 0;
    font-size: 0.95rem;
}

.ink-dropzone.compact .dropzone-prompt .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.ink-dropzone:hover,
.ink-dropzone.dragover {
    border-color: #007cba;
    background: #f0f9ff;
    transform: scale(1.005);
}

.dropzone-prompt p {
    margin: 10px 0 6px;
    font-size: 1rem;
    font-weight: 500;
    color: #4a5568;
}

.dropzone-prompt .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #a0aec0;
    transition: color 0.3s;
}

.ink-dropzone:hover .dropzone-prompt .dashicons {
    color: #007cba;
}

.file-limits {
    font-size: 0.85rem;
    color: #a0aec0;
}

/* Artwork Toggles */
.ink-artwork-method-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ink-radio-toggle {
    flex: 1;
    position: relative;
}

.ink-radio-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ink-radio-toggle .toggle-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    color: #64748b;
}

.ink-radio-toggle input:checked+.toggle-content {
    background: #007cba;
    color: white;
    border-color: #007cba;
    box-shadow: 0 4px 6px rgba(0, 124, 186, 0.2);
}

.ink-method-panel {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sub Options (Other Method) */
.ink-sub-options {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
}

.ink-radio-block {
    display: block;
    margin-bottom: 12px;
    cursor: pointer;
}

.ink-radio-block:last-child {
    margin-bottom: 0;
}

.ink-radio-block input {
    margin-top: 4px;
    float: left;
    margin-right: 10px;
}

.ink-radio-block .radio-label {
    display: block;
    overflow: hidden;
}

.ink-radio-block .sub-text {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
    font-weight: normal;
}


/* Artwork List */
.ink-artwork-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ink-artwork-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.ink-artwork-item:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.ink-artwork-item.uploading {
    background: #f8fafc;
}

.ink-artwork-item img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #edf2f7;
    flex-shrink: 0;
}

.ink-artwork-item .dashicons {
    font-size: 40px;
    width: 44px;
    height: 44px;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.preview-file-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.4;
    min-width: 0;
    /* Text truncation fix */
}

.preview-file-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-file-status {
    font-size: 0.8rem;
    color: #718096;
}

.remove-artwork {
    color: #cbd5e0;
    cursor: pointer;
    font-size: 20px;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-artwork:hover {
    color: #fc8181;
    background: #fff5f5;
}

/* Per-file Progress Bar */
.ink-item-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #48bb78;
    /* Green for success/progress */
    width: 0%;
    transition: width 0.2s ease;
    opacity: 0;
}

.ink-artwork-item.uploading .ink-item-progress {
    opacity: 1;
}

.ink-artwork-item.error {
    border-color: #fc8181;
    background: #fff5f5;
}

.ink-artwork-item.error .preview-file-status {
    color: #e53e3e;
}

/* Price Summary */
.inkstation-price-summary {
    background: #f0f9ff;
    padding: 20px 24px;
    border-radius: 10px;
    border-top: 4px solid #007cba;
    margin-top: 20px;
    box-shadow: 0 4px 15px rgba(0, 124, 186, 0.08);
}

.inkstation-price-summary .price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.total-price-row {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2d3748;
    border-bottom: 2px solid rgba(0, 124, 186, 0.1);
    padding-bottom: 12px !important;
    margin-bottom: 8px;
}

.exh-vat-row {
    font-size: 0.95rem;
    color: #718096;
    font-weight: 500;
}

/* Artwork Disclaimer */
.inkstation-artwork-disclaimer {
    background: #fff8eb;
    border-left: 4px solid #f6ad55;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 30px 0 10px;
}

.inkstation-artwork-disclaimer p {
    margin: 0;
    font-size: 0.95rem;
    color: #744210;
    line-height: 1.5;
    font-weight: 500;
}

/* Download Quote Button */
.ink-quote-actions {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e0;
}

.ink-btn-download {
    width: 100%;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #5a6b7c !important;
    color: #fff !important;
    font-weight: 600 !important;
    border: none !important;
    transition: all 0.2s ease !important;
}

.ink-btn-download:hover {
    background: #2d3748 !important;
    transform: translateY(-1px);
}

.ink-quote-hint {
    font-size: 0.8rem;
    color: #a0aec0;
    margin: 0;
    text-align: center;
}

.ink-quote-actions-wrapper {
    margin-top: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.ink-quote-actions-wrapper .ink-btn-download {
    width: 100%;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #5a6b7c;
    color: #fff;
    font-weight: 600;
    border: none;
    padding: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.ink-quote-actions-wrapper .ink-btn-download:hover {
    background: #2d3748;
    transform: translateY(-1px);
}

/* PDF Quote Template Styles */
#ink-quote-pdf-template {
    color: #2d3748;
    line-height: 1.6;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #007cba;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.quote-logo {
    max-width: 180px;
    height: auto;
}

.quote-title h1 {
    color: #007cba;
    margin: 0;
    font-size: 2rem;
    text-align: right;
}

.quote-date {
    margin: 5px 0 0;
    color: #718096;
    text-align: right;
}

.quote-section h3,
.quote-summary h3 {
    border-left: 4px solid #007cba;
    padding-left: 12px;
    color: #1a202c;
    font-size: 1.1rem;
    margin: 25px 0 15px;
}

.q-options-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.q-options-list li {
    padding: 6px 0;
    border-bottom: 1px dotted #e2e8f0;
}

.quote-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.quote-table th,
.quote-table td {
    padding: 10px 0;
    text-align: left;
}

.quote-table td {
    text-align: right;
    font-weight: 600;
}

.q-total-line th,
.q-total-line td {
    border-top: 2px solid #2d3748;
    font-size: 1.25rem;
    padding-top: 15px;
}

.quote-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: #718096;
    text-align: center;
}

.quote-disclaimer {
    font-size: 0.85rem;
    font-style: italic;
    margin-top: 10px;
}

/* Loading State */
.inkstation-options.loading {
    opacity: 0.7;
    pointer-events: none;
    filter: grayscale(0.5);
    transition: all 0.3s;
}

.ink-btn-download.loading {
    opacity: 0.8;
    cursor: wait !important;
}

.spin {
    animation: ink-spin 1s infinite linear;
    display: inline-block;
}

@keyframes ink-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Booklet Section Styles */
.ink-frontend-section {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.ink-frontend-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Custom Tooltip Styles */
.ink-info-icon {
    position: relative;
    cursor: help;
    margin-left: 6px;
    color: #64748b;
    font-size: 18px;
    vertical-align: text-bottom;
    display: inline-block;
}

.ink-info-icon:hover {
    color: #004267;
}

/* Tooltip Body - Text Attribute (Legacy/Simple) and HTML Content */
.ink-info-icon[data-tooltip]:hover::after,
.ink-info-icon[data-tooltip-html="true"]:hover .ink-tooltip-content {
    content: attr(data-tooltip);
    /* Ignored for .ink-tooltip-content */
    display: block;
    position: absolute;
    bottom: 130%;
    /* Position above icon */
    left: 50%;
    transform: translateX(-50%);
    background-color: #004267;
    /* Requested Dark Blue */
    color: #ffffff;
    /* Requested White Text */
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    /* Increased size */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    /* Clean sans-serif */
    font-weight: 400;
    /* Normal weight */
    text-transform: none;
    line-height: 1.5;
    white-space: normal;
    width: 280px;
    z-index: 10000;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    text-align: left;
    pointer-events: none;
    letter-spacing: normal;
}

/* Ensure content inside HTML tooltip inherits color and style */
.ink-tooltip-content {
    display: none;
}

/* Tooltip Arrow */
.ink-info-icon[data-tooltip]:hover::before,
.ink-info-icon[data-tooltip-html="true"]:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #004267 transparent transparent transparent;
    z-index: 10000;
}