/* assets/wizard.css - Frontend Styles */

/* ====== Temel Sihirbaz Stilleri ====== */
.wc-product-wizard-container {
    text-align: center;
    margin: 20px 0;
}

.wc-wizard-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    padding: 15px 30px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.wc-wizard-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.wizard-icon {
    margin-right: 10px;
    font-size: 20px;
}

/* ====== Modal Stilleri ====== */
.wc-wizard-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wizard-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.wizard-modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.wizard-modal-open {
    overflow: hidden;
}

/* ====== Modal Header ====== */
.wizard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.wizard-close {
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.wizard-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ====== Progress Bar ====== */
.wizard-progress {
    background: #f8f9fa;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
}

.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.4s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* ====== Wizard Content ====== */
.wizard-content {
    padding: 30px;
    max-height: 50vh;
    overflow-y: auto;
}

.wizard-step {
    animation: stepFadeIn 0.5s ease-out;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 30px;
}

.step-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.required {
    color: #e74c3c;
}

.step-description {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* ====== Seçenek Stilleri ====== */
.step-options {
    display: grid;
    gap: 15px;
}

/* Select Dropdown */
.wizard-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    background: white;
    transition: border-color 0.3s ease;
}

.wizard-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Radio ve Checkbox Grupları */
.wizard-radio-group,
.wizard-checkbox-group {
    display: grid;
    gap: 12px;
}

.wizard-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.wizard-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0.1;
    transition: width 0.3s ease;
}

.wizard-option:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.wizard-option:hover::before {
    width: 100%;
}

.wizard-option input[type="radio"],
.wizard-option input[type="checkbox"] {
    margin-right: 15px;
    transform: scale(1.3);
    accent-color: #667eea;
}

.wizard-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.option-text {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Resimli Seçenekler */
.wizard-image-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.wizard-image-option {
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease;
}

.wizard-image-option:hover {
    transform: scale(1.05);
}

.option-image-container {
    border: 3px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wizard-image-option input:checked + .option-image-container {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.option-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: transform 0.3s ease;
}

.wizard-image-option:hover .option-image {
    transform: scale(1.1);
}

.wizard-image-option input[type="radio"],
.wizard-image-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* ====== Wizard Footer ====== */
.wizard-footer {
    background: #f8f9fa;
    padding: 25px 30px;
    border-top: 1px solid #e9ecef;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wizard-actions {
    display: flex;
    gap: 15px;
}

.wizard-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wizard-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.wizard-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.wizard-btn-secondary {
    background: #6c757d;
    color: white;
}

.wizard-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.wizard-btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.wizard-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.6);
}

.wizard-btn-ghost {
    background: transparent;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.wizard-btn-ghost:hover {
    background: #e9ecef;
}

.btn-icon {
    font-size: 14px;
}

/* ====== Loading ve Sonuçlar ====== */
.wizard-loading {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.wizard-products-container {
    margin-top: 20px;
}

.wizard-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.no-products-found {
    text-align: center;
    padding: 40px 20px;
}

.no-products-found h3 {
    color: #e74c3c;
    margin-bottom: 10px;
}

/* ====== Responsive Tasarım ====== */
@media (max-width: 768px) {
    .wizard-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 95vh;
    }
    
    .wizard-header {
        padding: 20px;
    }
    
    .wizard-title {
        font-size: 20px;
    }
    
    .wizard-content {
        padding: 20px;
    }
    
    .step-title {
        font-size: 24px;
    }
    
    .wizard-image-group {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 15px;
    }
    
    .option-image {
        width: 60px;
        height: 60px;
    }
    
    .wizard-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .wizard-actions {
        width: 100%;
        justify-content: center;
    }
    
    .wizard-btn {
        padding: 15px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .wizard-image-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wizard-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .wizard-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ====== Admin Stilleri ====== */
.wc-wizard-admin-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 20px;
}

.wc-wizard-fields-section {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
}

.wc-wizard-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wc-wizard-fields-container {
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    background: #fafafa;
    min-height: 200px;
    padding: 20px;
}

.wc-wizard-field-item {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: box-shadow 0.3s ease;
}

.wc-wizard-field-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.field-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
    border-radius: 8px 8px 0 0;
}

.field-drag-handle {
    margin-right: 10px;
    cursor: move;
    color: #666;
}

.field-title {
    flex: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.field-actions {
    display: flex;
    gap: 5px;
}

.field-content {
    padding: 20px;
}

.field-options-container {
    border: 1px solid #e1e1e1;
    border-radius: 4px;
    padding: 15px;
    background: #fafafa;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.option-item input[type="text"] {
    flex: 1;
}

.option-image {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-option {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.no-fields-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.wc-wizard-sidebar .postbox {
    margin-bottom: 20px;
}

.wc-wizard-sidebar .postbox h3 {
    margin: 0;
    padding: 15px;
    background: #f1f1f1;
    border-bottom: 1px solid #e1e1e1;
}

.wc-wizard-sidebar .inside {
    padding: 15px;
}

/* Modal Stilleri */
.wc-wizard-modal .modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e1e1;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e1e1e1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-content.large {
    max-width: 900px;
}

/* Sortable */
.ui-sortable-helper {
    box-shadow: 0 5px 15px rgba(0,0,0,0.3) !important;
    transform: rotate(2deg) !important;
}

.ui-sortable-placeholder {
    border: 2px dashed #ccc !important;
    background: #f9f9f9 !important;
    visibility: visible !important;
    height: 80px !important;
}

/* ====== Ürün Sonuçları Stilleri ====== */
.wizard-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wizard-product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.wizard-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.wizard-product-card .product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wizard-product-card .product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.wizard-product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wizard-product-card:hover .product-image img {
    transform: scale(1.05);
}

.wizard-product-card .product-info {
    padding: 15px;
}

.wizard-product-card .product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.wizard-product-card .product-rating {
    margin-bottom: 10px;
}

.wizard-product-card .product-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 15px;
}

.wizard-product-card .product-actions {
    margin-top: 10px;
}

.wizard-product-card .add-to-cart-btn,
.wizard-product-card .view-product-btn {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.wizard-product-card .add-to-cart-btn:hover,
.wizard-product-card .view-product-btn:hover {
    background: #2980b9;
    color: white;
}

.no-products-found {
    text-align: center;
    padding: 40px 20px;
}

.no-products-found h3 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.no-products-found p {
    color: #666;
    margin-bottom: 20px;
}

/* Loading Spinner */
.wizard-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wizard-loading p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Error Messages */
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    text-align: center;
    margin: 20px 0;
}

/* Responsive Ürün Kartları */
@media (max-width: 768px) {
    .wizard-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .wizard-product-card .product-image {
        height: 150px;
    }
}