/**
 * Design Template Download & Customer File Upload Styles
 */

/* ==========================================================================
   PRODUCT PAGE - Design Template Download
   ========================================================================== */

.design-template-download {
    background: linear-gradient(135deg, #f8f6fb 0%, #ebe5f3 100%);
    border: 2px dashed #5a3e85;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.design-template-download .template-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 15px 0;
    color: #2e1a47;
    font-size: 16px;
}

.design-template-download .template-info .dashicons {
    color: #5a3e85;
}

.design-template-download .design-template-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #5a3e85 0%, #2e1a47 100%);
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
}

.design-template-download .design-template-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(90, 62, 133, 0.4);
    background: linear-gradient(135deg, #6b4a9e 0%, #3a2259 100%);
}

.design-template-download .design-template-btn .btn-icon {
    font-size: 18px;
}

.design-template-download .template-help {
    margin: 15px 0 0 0;
    font-size: 13px;
    color: #666;
}

/* ==========================================================================
   CART & CHECKOUT - File Upload Section (WooCommerce Blocks Compatible)
   ========================================================================== */

#customer-design-upload-container {
    width: 100%;
    margin: 20px 0;
}

.customer-file-upload-section,
.customer-file-upload-checkout {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    margin: 30px 0;
}

/* WooCommerce Blocks specific positioning */
.wp-block-woocommerce-cart + #customer-design-upload-container,
.wc-block-cart + #customer-design-upload-container {
    margin-top: 30px;
}

.wc-block-checkout__sidebar #customer-design-upload-container,
.wp-block-woocommerce-checkout-order-summary-block + #customer-design-upload-container {
    margin-bottom: 20px;
}

.customer-file-upload-section h3,
.customer-file-upload-checkout h3 {
    margin: 0 0 10px 0;
    color: #2e1a47;
    font-size: 18px;
}

.upload-description {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.upload-field-wrapper {
    position: relative;
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-field-wrapper:hover {
    border-color: #5a3e85;
    background: #f8f6fb;
}

.upload-field-wrapper.dragover {
    border-color: #5a3e85;
    background: #ebe5f3;
    border-style: solid;
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.upload-icon {
    font-size: 40px;
}

.upload-text {
    color: #666;
    font-size: 14px;
}

.upload-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
}

.upload-preview .file-name {
    color: #2e7d32;
    font-weight: 500;
}

.upload-preview .remove-file {
    background: #ef5350;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.upload-preview .remove-file:hover {
    background: #c62828;
}

.upload-submit-btn {
    margin-top: 15px;
    background: linear-gradient(135deg, #5a3e85 0%, #2e1a47 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-submit-btn:hover {
    background: linear-gradient(135deg, #6b4a9e 0%, #3a2259 100%) !important;
    transform: translateY(-1px);
}

.upload-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.upload-status {
    margin-top: 15px;
    font-size: 14px;
}

.upload-status .uploading {
    color: #1976d2;
}

.upload-status .success {
    color: #2e7d32;
}

.upload-status .error {
    color: #c62828;
}

.uploaded-file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.uploaded-file-info .file-icon {
    font-size: 20px;
}

.uploaded-file-info .remove-uploaded-file {
    margin-left: auto;
    color: #c62828;
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
}

.uploaded-file-info .remove-uploaded-file:hover {
    text-decoration: underline;
}

.checkout-uploaded {
    flex-wrap: wrap;
}

.checkout-uploaded .file-note,
.uploaded-file-info .file-note {
    width: 100%;
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #666;
    padding-left: 30px;
}

.no-file-notice {
    color: #666;
    font-style: italic;
}

.no-file-notice a {
    color: #5a3e85;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media screen and (max-width: 768px) {
    .design-template-download {
        padding: 15px;
    }
    
    .design-template-download .template-info {
        font-size: 14px;
    }
    
    .design-template-download .design-template-btn {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .customer-file-upload-section,
    .customer-file-upload-checkout {
        padding: 20px 15px;
        margin: 20px 0;
    }
    
    .upload-field-wrapper {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 30px;
    }
    
    .uploaded-file-info {
        flex-wrap: wrap;
    }
    
    .uploaded-file-info .remove-uploaded-file {
        width: 100%;
        margin: 10px 0 0 30px;
    }
}
