/* Provi Sell Sheet Styles */

/* Container */
.pss-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.pss-container h2 {
    color: #1d2327;
    margin: 0 0 25px 0;
    padding: 0;
    font-size: 26px;
    font-weight: 600;
}

/* Sections */
.pss-section {
    background: #fff;
    margin-bottom: 20px;
    padding: 25px;
    border: 1px solid #c3c4c7;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.pss-section h3 {
    margin: 0 0 15px 0;
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#pss-count-text {
    color: #2271b1;
    font-size: 16px;
    font-weight: 600;
}

.pss-help-text {
    margin: 10px 0 0 0;
    color: #646970;
    font-size: 13px;
    font-style: italic;
}

/* Search */
.pss-search-group {
    position: relative;
}

.pss-search-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.pss-search-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
}

.pss-search-group input:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.pss-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #8c8f94;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.pss-search-item {
    padding: 12px 15px;
    cursor: pointer !important;
    border-bottom: 1px solid #f0f0f1;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.pss-search-item:hover:not(.pss-search-item-already-selected) {
    background: #e8f4f8 !important;
    border-left: 3px solid #2271b1 !important;
    cursor: pointer !important;
}

.pss-search-item:last-child {
    border-bottom: none;
}

.pss-search-item strong {
    color: #2271b1;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.pss-search-item-already-selected {
    background: #f0f6fc;
    cursor: default !important;
    opacity: 0.7;
}

.pss-search-item-already-selected:hover {
    background: #f0f6fc !important;
    border-left: 3px solid transparent !important;
    cursor: default !important;
}

.pss-search-item-badge {
    float: right;
    background: #00a32a;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

/* Table */
.pss-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
}

.pss-table thead {
    background: #f6f7f7;
}

.pss-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #1d2327;
    border-bottom: 2px solid #c3c4c7;
}

.pss-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f1;
    font-size: 13px;
    vertical-align: middle;
}

.pss-table tbody tr {
    cursor: move;
    transition: background-color 0.15s;
}

.pss-table tbody tr:hover {
    background: #f6f7f7;
}

.pss-table tbody tr.dragging {
    opacity: 0.5;
}

.pss-drag-handle {
    color: #8c8f94;
    font-size: 18px;
    cursor: move;
    text-align: center;
}

.pss-product-code {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2271b1;
    font-size: 13px;
}

.pss-product-name {
    color: #1d2327;
}

.pss-remove-btn {
    background: #d63638;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.15s;
}

.pss-remove-btn:hover {
    background: #b32d2e;
}

/* Form Fields */
.pss-form-field {
    margin-bottom: 15px;
}

.pss-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

.pss-form-field input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
}

.pss-form-field input[type="number"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.pss-form-field select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
}

.pss-form-field select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.pss-form-field input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

.pss-button {
    background: #2271b1;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s;
}

.pss-button:hover {
    background: #135e96;
}

.pss-button:disabled {
    background: #8c8f94;
    cursor: not-allowed;
}

.pss-info-box {
    margin-top: 12px;
    padding: 12px 15px;
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    border-radius: 3px;
    font-size: 13px;
    line-height: 1.6;
}

.pss-info-box strong {
    color: #2271b1;
    font-size: 14px;
}

.pss-error-box {
    margin-top: 12px;
    padding: 12px 15px;
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    border-radius: 3px;
    color: #a00;
    font-size: 13px;
}

/* Generate Button */
.pss-generate-btn {
    background: #2271b1;
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pss-generate-btn:hover {
    background: #135e96;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.pss-generate-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pss-generate-btn:disabled {
    background: #8c8f94;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Status Messages */
.pss-status {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}

.pss-status.loading {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    color: #1d2327;
    display: block;
}

.pss-status.success {
    background: #edfaef;
    border-left: 4px solid #00a32a;
    color: #1d2327;
    display: block;
}

.pss-status.error {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #a00;
    display: block;
}

.pss-status a {
    color: #2271b1;
    text-decoration: underline;
    font-weight: 600;
}

.pss-status a:hover {
    color: #135e96;
}

/* Responsive */
@media (max-width: 782px) {
    .pss-container {
        margin: 10px;
    }

    .pss-section {
        padding: 15px;
    }

    .pss-table {
        font-size: 12px;
    }

    .pss-table th,
    .pss-table td {
        padding: 8px;
    }
}
