/* Frontend štýly pre Konfigurátor sviečok */

.pcc-configurator {
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.pcc-configurator-title h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.pcc-configurator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

/* Preview sekcia */
.pcc-preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pcc-preview-container {
    width: 100%;
    max-width: 500px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#pcc-preview-wrapper {
    position: relative;
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcc-candle-preview-wrapper {
    position: relative;
    width: 100%;
    display: inline-block;
}

.pcc-candle-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.pcc-text-overlay {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: clamp(16px, 4vw, 32px);
    font-weight: 600;
    color: #333;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8),
                 -1px -1px 2px rgba(255, 255, 255, 0.8),
                 1px -1px 2px rgba(255, 255, 255, 0.8),
                 -1px 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.pcc-text-overlay:empty {
    opacity: 0;
}

#pcc-preview-image {
    max-width: 100%;
    height: auto;
    display: block;
}

.pcc-no-preview {
    text-align: center;
    color: #999;
    padding: 60px 20px;
    font-style: italic;
}

.pcc-preview-loading {
    text-align: center;
    margin-top: 15px;
}

.pcc-preview-loading .spinner {
    float: none;
    margin: 0 auto 10px;
}

/* Options sekcia */
.pcc-options-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.pcc-option-group {
    display: flex;
    flex-direction: column;
}

.pcc-option-group label {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    font-size: 16px;
}

.pcc-option-group label .required {
    color: #dc3232;
}

.pcc-option-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.pcc-option-group input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
}

.pcc-char-counter {
    margin-top: 8px;
    color: #666;
    font-size: 14px;
}

#pcc-char-count {
    font-weight: 600;
    color: #0073aa;
}

/* Vône grid */
.pcc-scents-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.pcc-scent-option {
    position: relative;
}

.pcc-scent-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.pcc-scent-option label {
    display: block;
    padding: 15px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.pcc-scent-option label:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 5px rgba(0,115,170,0.1);
}

.pcc-scent-option input[type="radio"]:checked + label {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.pcc-scent-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.pcc-scent-description {
    display: block;
    font-size: 13px;
    opacity: 0.8;
}

.pcc-scent-option input[type="radio"]:checked + label .pcc-scent-description {
    opacity: 0.9;
}

/* Notice */
.pcc-configurator-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px 15px;
    text-align: center;
}

.pcc-configurator-notice p {
    margin: 0;
    color: #856404;
}

/* Responsive */
@media (max-width: 992px) {
    .pcc-configurator-content {
        grid-template-columns: 1fr;
    }
    
    .pcc-preview-container {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .pcc-configurator {
        padding: 20px 15px;
    }
    
    .pcc-scents-grid {
        grid-template-columns: 1fr;
    }
    
    .pcc-configurator-title h3 {
        font-size: 20px;
    }
}

/* WooCommerce form override */
.single-product .pcc-configurator {
    clear: both;
}

/* Animácie */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#pcc-preview-image {
    animation: fadeIn 0.3s ease-in-out;
}
