/**
 * UV-Workwear Plugin Styles
 * Datei: assets/uv-workwear.css
 */

#uv-workwear-generator {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.uv-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.uv-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 24px;
}

.uv-header p {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.form-section h3 {
    color: #34495e;
    border-bottom: 2px solid var(--e-global-color-uicore_secondary);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 18px;
}

.product-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.form-row.row-half {
    width: 49.6%;
    display: inline-block;
}

.product-checkbox {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.product-checkbox:hover {
    background: #f0f8ff;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
}

.product-checkbox input[type="checkbox"] {
    display: none;
}

.product-checkbox input[type="checkbox"]:checked + .checkmark {
    color: #3498db;
    font-weight: bold;
}

.product-checkbox input[type="checkbox"]:checked + .checkmark::before {
    content: "☑";
}

.checkmark::before {
    content: "☐";
    margin-right: 8px;
    font-size: 16px;
    color: #7f8c8d;
}

.product-config {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #f9f9f9;
}

.product-config h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 8px;
}

.config-rows {
    margin-bottom: 15px;
}

.config-row {
    display: grid;
    grid-template-columns: 1fr 2fr 2fr auto;
    gap: 10px;
    align-items: top;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 3px;
    border: 1px solid #ecf0f1;
}

.config-row > div {
    display: flex;
    flex-direction: column;
}

.config-row label {
    font-size: 12px;
    font-weight: bold;
    color: #34495e;
    margin-bottom: 5px;
}

.config-row select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.config-row select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.config-row select:invalid {
    border-color: #e74c3c;
}

.config-row select[multiple] {
    height: 80px;
}

.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #34495e;
}

.form-row input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-row input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.add-row-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
    margin-top: 10px;
}

.add-row-btn:hover {
    background: #219a52;
}

.remove-row-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 1px 5px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
    height: fit-content;
    position: relative;
}

.remove-row-btn:hover {
    background: #c0392b;
}

#price-calculation {
    text-align: center;
    padding: 20px;
    background: #ecf0f1;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 2px solid #bdc3c7;
}

#price-calculation h4 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

#total-price {
    font-size: 24px;
    font-weight: bold;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #F1854F;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: #F1854F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Angebots-Anzeige Styles */
.uv-offer-display {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.uv-offer-display h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 3px solid #3498db;
    padding-bottom: 15px;
}

.company-info,
.products-info,
.total-price,
.next-steps {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--e-global-color-uicore_dark);
    border-radius: 8px;
    background: #f9f9f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.company-info h3, .products-info h3, .next-steps h3 {
    font-family: "Manrope", Sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: var(--e-global-color-uicore_primary);
    border-bottom: 1px solid var(--e-global-color-uicore_accent);
    padding-bottom: 10px;
    margin-bottom: 15px;
    margin-top: 0px;
}

.company-info, .products-info {
    color: var(--e-global-color-uicore_primary);
}

.company-info p,
.next-steps p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.product-item {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
    border-bottom: 1px solid #ecf0f1;
    padding-bottom: 8px;
    margin-top: 0px;
}

.config-item {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 3px;
    border-left: 3px solid var(--e-global-color-uicore_accent);
}

.config-item p {
    margin-bottom: 5px;
    font-size: 14px;
}

.config-item hr {
    border: none;
    border-top: 1px solid #ecf0f1;
    margin: 10px 0;
}

.total-price {
    text-align: center;
    background: linear-gradient(135deg, #ecf0f1, #d5dbdb);
    border: 2px solid #27ae60;
}

.total-price h3 {
    color: #27ae60;
    font-size: 24px;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.next-steps {
    border-color: var(--e-global-color-uicore_dark);
}

/* PDF Download Button */
.pdf-download-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.pdf-download-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.4);
    color: white;
    text-decoration: none;
}

.pdf-download-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.3);
}

.pdf-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.3);
}

/* Stripe Payment Button */
.stripe-payment-btn {
    background: linear-gradient(135deg, #6772e5, #5469d4);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(103, 114, 229, 0.4);
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
    min-width: 250px;
}

.stripe-payment-btn:hover {
    background: linear-gradient(135deg, #5469d4, #4c63d2);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(103, 114, 229, 0.5);
    color: white;
}

.stripe-payment-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(103, 114, 229, 0.4);
}

.stripe-payment-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Invoice Download Button */
.invoice-download-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.invoice-download-btn:hover {
    background: linear-gradient(135deg, #20c997, #17a2b8);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

/* Payment Status Sections */
.payment-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.payment-section {
    background: none;
    border: none;
    border-radius: 8px;
    padding: 0px;
    margin-bottom: 0px;
    animation: fadeInUp 0.5s ease-out;
}

/* Stripe Elements Styling */
#payment-element {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-top: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

#payment-element.show {
    opacity: 1;
    transform: translateY(0);
}
div#status-check-loading {
    display: none;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Payment Loading Indicator */
#payment-loading {
    text-align: center;
    padding: 20px;
    color: #6772e5;
}

#payment-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #6772e5;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Payment Error */
#payment-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin-top: 15px;
}

/* Security Icons */
.security-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    font-size: 12px;
    color: #6c757d;
}

.security-icons .icon {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive Design für Payment */
@media (max-width: 768px) {
    .stripe-payment-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 16px;
    }

    .pdf-download-btn,
    .invoice-download-btn {
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }

    .payment-details {
        font-size: 14px;
    }

    #payment-element {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .payment-section,
    .payment-success {
        padding: 0px;
        margin-bottom: 0px;
    }

    .stripe-payment-btn {
        font-size: 16px;
        padding: 12px 20px;
    }

    .payment-details > div {
        font-size: 13px;
    }
}

/* Admin Panel Payment Status */
.payment-status-paid {
    color: #28a745;
    font-weight: bold;
}

.payment-status-unpaid {
    color: #dc3545;
    font-weight: bold;
}

.payment-status-pending {
    color: #ffc107;
    font-weight: bold;
}

/* Hover Effects für Buttons */
.pdf-download-btn,
.invoice-download-btn,
.stripe-payment-btn {
    position: relative;
    overflow: hidden;
}

.pdf-download-btn::before,
.invoice-download-btn::before,
.stripe-payment-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.pdf-download-btn:hover::before,
.invoice-download-btn:hover::before,
.stripe-payment-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    #uv-workwear-generator {
        padding: 10px;
    }

    .config-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .config-row > div {
        margin-bottom: 10px;
    }

    .product-selection {
        grid-template-columns: 1fr;
    }

    .uv-header h2 {
        font-size: 20px;
    }

    .uv-header p {
        font-size: 14px;
    }

    #total-price {
        font-size: 20px;
    }

    .submit-btn {
        font-size: 16px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 15px;
    }

    .uv-header {
        padding: 15px;
    }

    .config-item p {
        font-size: 13px;
    }

    .product-checkbox {
        padding: 8px;
        font-size: 14px;
    }
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ===========================================
   FILE UPLOAD STYLING - NEW SECTION
   =========================================== */

/* File Upload Input Styling */
.logo-upload-input {
    width: 100%;
    padding: 10px;
    border: 2px dashed #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s, background-color 0.3s;
    cursor: pointer;
    background: #fafafa;
}

.logo-upload-input:hover {
    border-color: #3498db;
    background: #f0f8ff;
}

.logo-upload-input:focus {
    outline: none;
    border-color: #3498db;
    background: #f0f8ff;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

/* Upload Preview Styling */
.upload-preview {
    margin-top: 10px;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 5px;
}

.upload-preview:empty {
    display: none;
}

.upload-preview > div {
    background: linear-gradient(135deg, #f0f8ff, #e6f3ff);
    border: 1px solid #d1ecf1;
    border-radius: 5px;
    padding: 12px;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    animation: slideInUp 0.3s ease-out;
}

.upload-preview > div:hover {
    background: linear-gradient(135deg, #e6f3ff, #cce7ff);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.upload-preview span {
    color: #2c3e50;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upload-preview span::before {
    content: "📄";
    font-size: 16px;
}

.upload-preview button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-preview button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.upload-preview button:active {
    transform: scale(0.95);
}


/* Enhanced File Upload Drag and Drop Styling */
.logo-upload-input.dragover {
    border-color: #28a745;
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-style: solid;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
}

.form-section.dragover {
    background: linear-gradient(135deg, #e8f5e8, #d4edda);
    border-color: #28a745;
    transform: scale(1.01);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.2);
}

/* File Type Icons */
.upload-preview span[data-ext="png"]::before { content: "🖼️"; }
.upload-preview span[data-ext="svg"]::before { content: "🎨"; }
.upload-preview span[data-ext="ai"]::before { content: "🎭"; }
.upload-preview span[data-ext="psd"]::before { content: "🎨"; }
.upload-preview span[data-ext="eps"]::before { content: "📐"; }
.upload-preview span[data-ext="tiff"]::before { content: "🖼️"; }
.upload-preview span[data-ext="pdf"]::before { content: "📄"; }

/* Error State Styling */
.upload-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border: 1px solid #dc3545;
    color: #721c24;
    padding: 12px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 20%, 40%, 60%, 80% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
}

/* Success State Styling */
.upload-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 1px solid #28a745;
    color: #155724;
    padding: 12px;
    border-radius: 5px;
    margin: 10px 0;
    font-weight: 500;
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Form Validation Styling for File Upload */
.form-row.has-error .logo-upload-input {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.form-row.has-success .logo-upload-input {
    border-color: #27ae60;
    background: #f0f9f0;
}

/* Loading State for File Upload */
.upload-loading {
    position: relative;
    opacity: 0.7;
    pointer-events: none;
}

.upload-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid #3498db;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* File Size Indicator */
.file-size-small::after { content: " 📦"; color: #27ae60; }
.file-size-medium::after { content: " 📦"; color: #f39c12; }
.file-size-large::after { content: " 📦"; color: #e74c3c; }

/* Progress Bar for Upload (if needed for future enhancement) */
.upload-progress {
    width: 100%;
    height: 6px;
    background: #f1f1f1;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.upload-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
            -45deg,
            rgba(255, 255, 255, .2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, .2) 50%,
            rgba(255, 255, 255, .2) 75%,
            transparent 75%,
            transparent
    );
    background-size: 50px 50px;
    animation: move 2s linear infinite;
}

@keyframes move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* High-Quality File Upload Instructions */
.file-upload-instructions {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 1px solid #2196f3;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
    color: #1565c0;
    font-size: 14px;
    line-height: 1.5;
}

.file-upload-instructions strong {
    color: #0d47a1;
}

.file-upload-instructions ul {
    margin: 10px 0 0 20px;
    padding: 0;
}

.file-upload-instructions li {
    margin: 5px 0;
}

/* File Format Icons in Instructions */
.format-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.format-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.format-item.png::before { content: "🖼️"; }
.format-item.svg::before { content: "🎨"; }
.format-item.ai::before { content: "🎭"; }
.format-item.psd::before { content: "🎨"; }
.format-item.eps::before { content: "📐"; }
.format-item.tiff::before { content: "🖼️"; }
.format-item.pdf::before { content: "📄"; }