/**
 * Redőny Konfigurátor - Stílusok
 */

/* === CSS VÁLTOZÓK === */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #dc3545;
    --warning-color: #f39c12;
    --info-color: #007bff;
    --success-color: #28a745;
    
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #ced4da;
    --border-dark: #adb5bd;
    
    --text-primary: #495057;
    --text-secondary: #6c757d;
    --text-dark: #212529;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
    
    --transition-fast: 0.15s ease-in-out;
    --border-radius: 4px;
    --border-radius-lg: 8px;
}

/* === BASE LAYOUT === */
.redony-main-container { 
    margin-bottom: 20px; 
}

.redony-config-section { 
    display: grid; 
    grid-template-columns: 2fr 1fr; 
}

/* === PREVIEW SECTION === */
.redony-preview {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start;
    border-radius: var(--border-radius-lg); 
    padding: 25px; 
    min-height: 600px; 
    position: relative;
}

.redony-preview h3 { 
    margin: 0 0 20px 0; 
    color: var(--primary-color); 
    font-size: 1.4em; 
    font-weight: 500; 
}

/* === INFO MESSAGE === */
.redony-info-message {
    width: 100%;
    max-width: 600px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
    border: 1px solid #b3d9ff;
    border-left: 4px solid #2196f3;
    border-radius: var(--border-radius-lg);
    padding: 14px 18px;
    margin-top: 20px;
    color: #1565c0;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.12);
}

.redony-info-content {
    margin: 0;
}

.redony-info-content p {
    margin: 0;
    text-align: left;
}

.redony-info-content strong {
    color: #0d47a1;
    font-weight: 600;
}

/* === WARNING DISPLAY === */
.redony-warning {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    padding: 20px 25px; 
    background: rgba(255, 245, 245, 0.95); 
    border: 1px solid #fecaca;
    border-radius: var(--border-radius-lg); 
    box-shadow: var(--shadow-lg); 
    backdrop-filter: blur(4px);
    z-index: 10; 
    max-width: 400px; 
    display: none;
}

.redony-warning.show { 
    display: block; 
}

.redony-warning-text { 
    color: var(--accent-color); 
    font-size: 15px; 
    font-weight: 600; 
    margin: 0; 
    text-align: center; 
    line-height: 1.4; 
}

/* === DRAWING CANVAS === */
#redonyDrawing {
    border: 1px solid #bdc3c7; 
    border-radius: 20px; 
    background: var(--bg-white);
    margin-top: 10px; 
    flex-shrink: 0; 
    width: 100%; 
    height: 500px;
    display: block; 
    margin: 0 auto; 
    max-width: 100%;
}

/* === INPUTS SECTION === */
.redony-inputs { 
    padding: 25px; 
}

.redony-inputs h3 {
    margin: 0 0 20px 0; 
    color: #333; 
    font-size: 1.3em; 
    font-weight: 500;
    padding-bottom: 10px; 
    border-bottom: 2px solid #e9ecef;
}

/* === PRODUCT INFO SECTION === */
.redony-product-info {
    background: var(--bg-white); 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius-lg); 
    padding: 20px; 
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.redony-product-info .price-wrapper {
    display: flex; 
    flex-direction: column; 
    align-items: flex-start; 
    margin-bottom: 15px;
}

.redony-product-info .price-group {
    margin-bottom: 5px;
}

.redony-product-info .product-price {
    font-size: 1.4em; 
    font-weight: bold; 
    color: var(--primary-color); 
    margin: 0;
}

.redony-product-info .product-tax {
    font-size: 0.9em; 
    color: var(--text-secondary); 
    font-style: italic;
}

.redony-product-info .product-stats {
    border-top: 1px solid var(--border-color); 
    padding-top: 15px;
}

.redony-product-info .product-stats ul {
    list-style: none; 
    padding: 0; 
    margin: 0;
}

.redony-product-info .product-stats li {
    padding: 4px 0; 
    font-size: 14px; 
    color: var(--text-primary);
}

.redony-product-info .product-stats li b {
    color: var(--text-dark); 
    margin-right: 8px;
}

.redony-product-info .product-stock.in-stock span {
    color: var(--success-color); 
    font-weight: 500;
}

.redony-product-info .product-model span {
    color: var(--text-secondary); 
    font-family: monospace;
}

/* === FORM CONTROLS === */
.redony-input-wrapper { 
    position: relative; 
    width: 100%; 
}

.redony-input-base, 
.redony-inputs select, 
.redony-inputs input[type="number"],
.redony-inputs input[type="text"][inputmode="numeric"] {
    width: 100%; 
    padding: 8px 45px 8px 12px; 
    border: 1px solid var(--border-color); 
    border-radius: var(--border-radius);
    font-size: 14px; 
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast); 
    background: var(--bg-white);
    -moz-appearance: textfield;
}

/* Fel-le nyilak eltávolítása */
.redony-inputs input[type="number"]::-webkit-outer-spin-button,
.redony-inputs input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; 
    margin: 0;
}

.redony-input-base:focus, 
.redony-inputs select:focus, 
.redony-inputs input[type="number"]:focus,
.redony-inputs input[type="text"][inputmode="numeric"]:focus {
    outline: none; 
    border-color: #80bdff; 
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.redony-input-base.error, 
.redony-inputs select.error, 
.redony-inputs input[type="number"].error,
.redony-inputs input[type="text"][inputmode="numeric"].error {
    border-color: var(--accent-color); 
    box-shadow: 0 0 0 0.2rem rgba(220,53,69,.25);
}

.redony-unit-label {
    position: absolute; 
    right: 8px; 
    top: 50%; 
    transform: translateY(-50%);
    background: var(--bg-light); 
    padding: 2px 6px; 
    border-radius: 3px;
    color: var(--text-secondary); 
    font-size: 12px; 
    font-weight: 500;
    border: 1px solid #e9ecef; 
    pointer-events: none;
}

.redony-input-group { 
    margin-bottom: 20px; 
}

.redony-inputs label { 
    display: block; 
    margin-bottom: 6px; 
    font-weight: 500; 
    color: var(--text-primary); 
    font-size: 14px; 
}

.redony-unit { 
    color: var(--text-secondary); 
    font-size: 12px; 
    margin-top: 3px; 
}

.redony-error-message {
    font-size: 12px; 
    margin-top: 4px; 
    display: none; 
    color: var(--accent-color);
}

.redony-error-message.show { 
    display: block; 
}

/* === VALIDATION MESSAGES SECTION === */
.redony-validation-section {
    background: var(--bg-light); 
    padding: 15px; 
    border-radius: var(--border-radius); 
    margin-bottom: 15px;
    border: 1px solid var(--border-color); 
    display: none;
}

.redony-validation-section.error {
    border-left: 3px solid var(--accent-color); 
    background-color: #fff8f8; 
    display: block;
}

.redony-validation-section.warning {
    border-left: 3px solid var(--warning-color); 
    background-color: #fffbf5; 
    display: block;
}

.redony-validation-section.info {
    border-left: 3px solid var(--info-color); 
    background-color: var(--bg-light); 
    display: block;
}

.redony-validation-section h4 {
    margin: 0 0 10px 0; 
    color: var(--text-primary); 
    font-size: 16px; 
    font-weight: 500;
}

.redony-validation-list {
    list-style: none; 
    padding: 0; 
    margin: 0 0 10px 0;
}

.redony-validation-list li {
    padding: 4px 0; 
    font-size: 14px; 
    line-height: 1.4;
}

.redony-validation-list li:before { 
    content: "• "; 
    font-weight: bold; 
    margin-right: 6px; 
}

.redony-validation-list.error li { 
    color: var(--accent-color); 
}

.redony-validation-list.warning li { 
    color: var(--warning-color); 
}

.redony-validation-list.info li { 
    color: var(--text-primary); 
}

.redony-understand-btn {
    padding: 6px 12px; 
    background: var(--warning-color); 
    color: white; 
    border: none;
    border-radius: var(--border-radius); 
    font-size: 12px; 
    font-weight: 500; 
    cursor: pointer;
    transition: background var(--transition-fast);
}

.redony-understand-btn:hover { 
    background: #e67e22; 
}

/* === SECTION INPUTS === */
.redony-section-inputs {
    background: var(--bg-light); 
    padding: 15px; 
    border-radius: var(--border-radius); 
    margin-bottom: 15px;
    border: 1px solid var(--border-color); 
    border-left: 3px solid var(--info-color);
}

.redony-section-inputs.invalid { 
    border-left-color: var(--accent-color); 
    background-color: #fff8f8; 
}

.redony-section-inputs h4 { 
    margin: 0 0 12px 0; 
    color: var(--text-primary); 
    font-size: 16px; 
    font-weight: 500; 
}

.redony-section-dimensions { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 10px; 
    margin-bottom: 12px; 
}

/* === RADIO STYLES === */
.redony-radio-base, 
.redony-division-option, 
.redony-control-option {
    position: relative; 
    display: flex; 
    align-items: center; 
    padding: 12px 15px;
    border: 2px solid var(--border-color); 
    border-radius: 6px; 
    cursor: pointer;
    transition: all var(--transition-fast); 
    background: var(--bg-white);
}

.redony-radio-base:hover, 
.redony-division-option:hover, 
.redony-control-option:hover {
    border-color: var(--border-dark); 
    background: var(--bg-light);
}

.redony-radio-base input[type="radio"], 
.redony-division-option input[type="radio"], 
.redony-control-option input[type="radio"] {
    position: absolute; 
    opacity: 0; 
    cursor: pointer; 
    width: 100%; 
    height: 100%; 
    margin: 0; 
    z-index: 1;
}

.redony-radio-base label, 
.redony-division-option label, 
.redony-control-option label {
    margin: 0; 
    cursor: pointer; 
    position: relative; 
    font-size: 14px; 
    font-weight: 500;
    color: var(--text-primary); 
    pointer-events: none; 
    width: 100%;
}

.redony-radio-base:has(input[type="radio"]:checked), 
.redony-division-option:has(input[type="radio"]:checked), 
.redony-control-option:has(input[type="radio"]:checked) {
    border-color: var(--accent-color); 
    background: #fff5f5;
}

.redony-radio-base:has(input[type="radio"]:checked) label, 
.redony-division-option:has(input[type="radio"]:checked) label, 
.redony-control-option:has(input[type="radio"]:checked) label {
    color: var(--accent-color); 
    font-weight: 600;
}

.redony-division-options { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.redony-control-options { 
    display: flex; 
    gap: 10px; 
    margin-top: 6px; 
}

.redony-control-option { 
    flex: 1; 
    text-align: center; 
    min-width: 0; 
}

.redony-control-position { 
    margin-top: 12px; 
}

/* === CART SECTION === */
.redony-quantity-group { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    margin-bottom: 15px; 
}

.redony-quantity-label { 
    font-weight: 500; 
    color: var(--text-primary); 
    font-size: 14px; 
    min-width: 70px; 
}

.redony-quantity-wrapper {
    display: flex; 
    align-items: center; 
    border: 1px solid var(--border-color); 
    border-radius: 6px;
    background: var(--bg-white); 
    overflow: hidden; 
    transition: border-color var(--transition-fast);
}

.redony-quantity-wrapper:focus-within { 
    border-color: #80bdff; 
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); 
}

.redony-quantity-btn {
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 36px; 
    height: 36px;
    background: var(--bg-light); 
    border: none; 
    cursor: pointer; 
    font-size: 16px; 
    font-weight: bold;
    color: var(--text-primary); 
    transition: all var(--transition-fast);
}

.redony-quantity-btn:hover { 
    background: #e9ecef; 
    color: var(--text-dark); 
}

.redony-quantity-btn:active { 
    background: #dee2e6; 
}

.redony-quantity-input {
    border: none; 
    outline: none; 
    text-align: center; 
    padding: 8px 12px; 
    font-size: 14px;
    font-weight: 500; 
    width: 60px; 
    background: transparent; 
    color: var(--text-primary);
    -moz-appearance: textfield;
}

.redony-quantity-input::-webkit-outer-spin-button,
.redony-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none; 
    margin: 0;
}

.redony-cart-btn {
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    padding: 14px 24px;
    background: linear-gradient(60deg, #141E30 0%, #243B55 100%); 
    color: white; 
    border: none;
    border-radius: 6px; 
    font-size: 16px; 
    font-weight: 600; 
    text-decoration: none; 
    cursor: pointer;
    transition: all var(--transition-fast); 
    width: 100%; 
    min-height: 50px; 
    box-shadow: var(--shadow-sm);
}

.redony-cart-btn:hover {
    background: linear-gradient(60deg, #0f1922 0%, #1e3248 100%); 
    color: white; 
    text-decoration: none;
    transform: translateY(-1px); 
    box-shadow: var(--shadow-md);
}

.redony-cart-btn:active { 
    transform: translateY(0); 
    box-shadow: var(--shadow-sm); 
}

.redony-cart-btn:disabled {
    background: var(--text-secondary); 
    cursor: not-allowed; 
    transform: none; 
    box-shadow: var(--shadow-sm); 
    opacity: 0.6;
}

.redony-cart-btn.processing {
    background: linear-gradient(60deg, #2c3e50 0%, #34495e 100%);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

#customPriceDisplay {
    transition: opacity 0.3s ease, color 0.3s ease; 
    min-height: 40px; 
    display: flex; 
    align-items: center;
    justify-content: center; 
    text-align: center; 
    padding: 10px; 
    border-radius: 6px;
    background: var(--bg-light); 
    border: 1px solid #e9ecef; 
    font-size: 1.2em; 
    font-weight: bold; 
    color: var(--primary-color);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .redony-config-section { 
        grid-template-columns: 1fr; 
    }
    
    .redony-section-dimensions { 
        grid-template-columns: 1fr; 
    }
    
    .redony-control-options { 
        flex-direction: column; 
        gap: 8px; 
    }
    
    .redony-quantity-group { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 8px; 
    }
}

@media (min-width: 1025px) {
    .redony-config-section { 
        align-items: start; 
    }
    
    .redony-preview { 
        position: sticky; 
        top: 40px; 
        align-self: start; 
        z-index: 1; 
    }
}

/* === READONLY FIELDS === */
input[readonly], 
input[disabled] {
    background-color: var(--bg-light) !important; 
    border-color: #e9ecef !important;
    color: var(--text-secondary) !important; 
    cursor: not-allowed !important;
}

input[readonly]:focus, 
input[disabled]:focus { 
    box-shadow: none !important; 
    border-color: #e9ecef !important; 
}

input[type="radio"][disabled] { 
    cursor: not-allowed !important; 
    opacity: 0.6 !important; 
}

input[type="radio"][disabled] + label { 
    cursor: not-allowed !important; 
    opacity: 0.6 !important; 
}