/* Personalized DP Plugin Styles */

.pdp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pdp-header {
    text-align: center;
    margin-bottom: 40px;
}

.pdp-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 700;
}

.pdp-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin: 0;
}

.pdp-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.pdp-creator-panel,
.pdp-preview-panel {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e8ed;
}

.pdp-section-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    font-weight: 600;
}

.pdp-form-group {
    margin-bottom: 20px;
}

.pdp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 0.95rem;
}

.pdp-form-group input[type="text"],
.pdp-form-group input[type="email"],
.pdp-form-group select,
.pdp-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.pdp-form-group input:focus,
.pdp-form-group select:focus,
.pdp-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.pdp-form-group input[type="color"] {
    width: 60px;
    height: 45px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.pdp-range-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdp-range-group input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e1e8ed;
    outline: none;
    -webkit-appearance: none;
}

.pdp-range-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pdp-range-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #2980b9;
    transform: scale(1.1);
}

.pdp-range-value {
    background: #ecf0f1;
    padding: 6px 12px;
    border-radius: 6px;
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.pdp-position-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pdp-position-controls > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pdp-position-controls label {
    font-size: 0.85rem;
    margin-bottom: 0;
}

.pdp-file-upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.pdp-file-upload-area:hover {
    border-color: #3498db;
    background: #e8f4fd;
    transform: translateY(-2px);
}

.pdp-file-upload-area.dragover {
    border-color: #2ecc71;
    background: #d5f4e6;
}

.pdp-file-upload-area p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: #34495e;
}

.pdp-file-upload-area small {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.pdp-canvas-container {
    border: 3px dashed #e1e8ed;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

#pdp-preview-canvas,
#pdp-user-canvas {
    max-width: 100%;
    max-height: 350px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.pdp-canvas-placeholder {
    color: #95a5a6;
    font-size: 1.1rem;
    font-weight: 500;
}

.pdp-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.pdp-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.pdp-btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: 2px solid transparent;
}

.pdp-btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f639a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.pdp-btn-secondary {
    background: #ecf0f1;
    color: #34495e;
    border: 2px solid #bdc3c7;
}

.pdp-btn-secondary:hover {
    background: #d5dbdb;
    border-color: #95a5a6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.pdp-share-section {
    margin-top: 25px;
    padding: 20px;
    background: #e8f6fd;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.pdp-share-section h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.pdp-share-url {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #bdc3c7;
    margin-bottom: 15px;
    word-break: break-all;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #34495e;
}

/* User Interface Styles */
.pdp-user-interface {
    max-width: 600px;
    margin: 0 auto;
}

.pdp-user-interface .pdp-creator-panel {
    width: 100%;
}

/* Loading States */
.pdp-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.pdp-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: pdp-spin 1s linear infinite;
}

@keyframes pdp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast Notifications */
.pdp-toast {
    position: fixed;
    top: 30px;
    right: 30px;
    background: #2ecc71;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 10000;
    font-weight: 600;
    max-width: 350px;
}

.pdp-toast.show {
    transform: translateX(0);
}

.pdp-toast.error {
    background: #e74c3c;
}

.pdp-toast.warning {
    background: #f39c12;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdp-container {
        padding: 15px;
    }
    
    .pdp-header h1 {
        font-size: 2rem;
    }
    
    .pdp-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .pdp-creator-panel,
    .pdp-preview-panel {
        padding: 20px;
    }
    
    .pdp-action-buttons {
        flex-direction: column;
    }
    
    .pdp-position-controls {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .pdp-range-group {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .pdp-toast {
        right: 15px;
        left: 15px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .pdp-toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .pdp-header h1 {
        font-size: 1.6rem;
    }
    
    .pdp-creator-panel,
    .pdp-preview-panel {
        padding: 15px;
    }
    
    .pdp-canvas-container {
        min-height: 250px;
        padding: 20px;
    }
    
    .pdp-file-upload-area {
        padding: 20px 15px;
        min-height: 100px;
    }
}

/* Elementor Integration Styles */
.elementor-pdp-widget .pdp-container {
    background: transparent;
    padding: 0;
}

.elementor-pdp-widget .pdp-header {
    margin-bottom: 30px;
}

.elementor-widget-personalized_dp .pdp-placeholder {
    background: #f8f9fa;
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    border: 2px dashed #bdc3c7;
    color: #7f8c8d;
}

.elementor-widget-personalized_dp .pdp-placeholder p {
    margin: 0 0 10px 0;
}

/* Animation Effects */
.pdp-form-group {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdp-creator-panel,
.pdp-preview-panel {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Custom Scrollbar */
.pdp-container::-webkit-scrollbar {
    width: 8px;
}

.pdp-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.pdp-container::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 4px;
}

.pdp-container::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

/* High DPI Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    #pdp-preview-canvas,
    #pdp-user-canvas {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}