/* Frontend Styles for Anyagszükséglet Kalkulátor */

.ask-calculator-wrapper {
    max-width: 800px;
    margin: 30px auto;
    padding: 0;
}

.ask-calculator-form {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Form Sections */
.ask-form-section {
    margin-bottom: 25px;
}

.ask-form-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.ask-form-section select,
.ask-form-section input[type="number"] {
    width: 100%;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.ask-form-section select:focus,
.ask-form-section input[type="number"]:focus {
    outline: none;
    border-color: #2271b1;
}

/* Input Group */
.ask-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ask-input-group input {
    flex: 1;
}

.ask-input-unit {
    padding: 12px 15px;
    background: #f0f0f1;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
}

/* Product Info */
.ask-product-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.ask-product-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.6;
}

.ask-product-info p:last-child {
    margin-bottom: 0;
}

.ask-product-function {
    font-style: italic;
    color: #666;
}

.ask-product-details {
    color: #333;
}

/* Form Actions */
.ask-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.ask-form-actions .button {
    flex: 1;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.ask-calculate-btn {
    background: #2271b1;
    color: #fff;
}

.ask-calculate-btn:hover {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.ask-reset-btn {
    background: #f0f0f1;
    color: #333;
}

.ask-reset-btn:hover {
    background: #dcdcde;
}

/* Result Section */
.ask-result {
    margin-top: 30px;
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.ask-result-header {
    background: #2271b1;
    color: #fff;
    padding: 20px 30px;
}

.ask-result-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.ask-result-body {
    padding: 30px;
}

.ask-result-product {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.ask-result-product-name {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #2271b1;
}

.ask-result-product-function {
    margin: 0;
    color: #666;
    font-style: italic;
}

/* Result Table */
.ask-result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.ask-result-table tr {
    border-bottom: 1px solid #e0e0e0;
}

.ask-result-table td {
    padding: 12px 10px;
    font-size: 15px;
}

.ask-result-table td:first-child {
    color: #666;
    width: 50%;
}

.ask-result-table td:last-child {
    text-align: right;
    color: #333;
    font-weight: 500;
}

.ask-result-table tr.ask-highlight {
    background: #f8f9fa;
}

.ask-result-table tr.ask-highlight td {
    padding: 15px 10px;
}

.ask-result-table tr.ask-total-price {
    background: #e7f3ff;
    border-bottom: none;
}

.ask-result-table tr.ask-total-price td {
    font-size: 18px;
    color: #2271b1;
}

/* Result Actions */
.ask-result-actions {
    margin: 25px 0;
    text-align: center;
}

.ask-add-to-cart-btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 600;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.ask-add-to-cart-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Info Message */
.ask-result-no-woo {
    margin: 20px 0;
    padding: 15px 20px;
    background: #e7f3ff;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.ask-info-message {
    margin: 0;
    color: #135e96;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ask-info-message .dashicons {
    flex-shrink: 0;
    margin-top: 2px;
    color: #2271b1;
}

/* Disclaimer */
.ask-result-disclaimer {
    margin-top: 25px;
    padding: 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.ask-result-disclaimer p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #856404;
}

/* Error Section */
.ask-error {
    margin-top: 20px;
    padding: 20px;
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 8px;
}

.ask-error-message {
    margin: 0;
    color: #721c24;
    font-size: 16px;
    font-weight: 600;
}

/* Loading */
.ask-loading {
    margin-top: 20px;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
}

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

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

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

/* Description Text */
.description {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .ask-calculator-wrapper {
        margin: 20px 10px;
    }
    
    .ask-calculator-form {
        padding: 20px;
    }
    
    .ask-form-actions {
        flex-direction: column;
    }
    
    .ask-result-body {
        padding: 20px;
    }
    
    .ask-result-table td {
        font-size: 14px;
        padding: 10px 5px;
    }
    
    .ask-result-table td:first-child {
        width: 60%;
    }
    
    .ask-add-to-cart-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .ask-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ask-input-unit {
        text-align: center;
    }
    
    .ask-result-header h3 {
        font-size: 18px;
    }
    
    .ask-result-product-name {
        font-size: 18px;
    }
}
