/**
 * Frontend stílusok - Contact Form 7 alapú
 */

.ajanlatkero-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Form alapok */
.ajanlatkero-form {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Szekciók */
.ajanlatkero-form-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.ajanlatkero-form-section:last-of-type {
    border-bottom: none;
}

.ajanlatkero-section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

/* Form csoportok */
.ajanlatkero-form-group {
    margin-bottom: 20px;
}

.ajanlatkero-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ajanlatkero-form-group label .required {
    color: #d63638;
    font-weight: bold;
}

/* Mezők - CF7 stílus */
.wpcf7-form-control-wrap {
    display: block;
}

.wpcf7-form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.wpcf7-form-control:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.wpcf7-form-control.wpcf7-not-valid {
    border-color: #d63638;
}

/* Select mezők */
.wpcf7-select {
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    color: #000;
}

.ajanlatkero-form .wpcf7-select:focus {
    background-color: #ededed !important;
}

.wpcf7-select option {
    color: #000 !important;
    background: #fff !important;
}

.wpcf7-select option[value=""] {
    color: #000 !important;
}

.wpcf7-select option:hover,
.wpcf7-select option:focus,
.wpcf7-select option:checked {
    background: #f0f0f0 !important;
    color: #000 !important;
}

/* Hierarchikus választó */
.hierarchical-select-wrapper {
    position: relative;
}

.hierarchical-select-level {
    margin-bottom: 10px;
}

.hierarchical-select-level select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    color: #000;
}

.ajanlatkero-form .hierarchical-select-level select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    background-color: #ededed !important;
}

.hierarchical-select-level select option {
    color: #000 !important;
    background: #fff !important;
}

.hierarchical-select-level select option[value=""] {
    color: #000 !important;
}

.hierarchical-select-level select option:hover,
.hierarchical-select-level select option:focus,
.hierarchical-select-level select option:checked {
    background: #f0f0f0 !important;
    color: #000 !important;
}

.hierarchical-select-level select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.hierarchical-breadcrumb {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 4px;
}

/* Összesítő */
.ajanlatkero-summary {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border: 2px solid #2271b1;
}

.ajanlatkero-price-summary {
    font-size: 16px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.price-total {
    font-size: 20px;
    font-weight: bold;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid #2271b1;
}

.price-label {
    color: #555;
}

.price-value {
    font-weight: 600;
    color: #2271b1;
}

/* Captcha */
.ajanlatkero-captcha {
    margin: 25px 0;
    text-align: center;
}

/* Submit gomb */
.ajanlatkero-form-submit {
    text-align: center;
    margin-top: 30px;
    position: relative;
}

.wpcf7-submit {
    background: #2271b1;
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.wpcf7-submit:hover {
    background: #135e96;
}

.wpcf7-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ajanlatkero-spinner {
    display: inline-block;
    margin-left: 10px;
    vertical-align: middle;
}

.ajanlatkero-spinner .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #2271b1;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Response üzenetek */
.wpcf7-response-output {
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.wpcf7-response-output.wpcf7-mail-sent-ok {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wpcf7-response-output.wpcf7-validation-errors,
.wpcf7-response-output.wpcf7-mail-sent-ng {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Nyilatkozatok */
.ajanlatkero-consents {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
}

.ajanlatkero-consent-item {
    margin-bottom: 15px;
}

.ajanlatkero-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-weight: normal;
}

.ajanlatkero-consent-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    cursor: pointer;
}

.ajanlatkero-consent-text {
    flex: 1;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
}

.ajanlatkero-consent-text a {
    color: #2271b1;
    text-decoration: underline;
}

.ajanlatkero-consent-text a:hover {
    color: #135e96;
}

.ajanlatkero-consent-item.error .ajanlatkero-consent-label {
    color: #d63638;
}

.ajanlatkero-consent-item.error .ajanlatkero-consent-checkbox {
    border-color: #d63638;
}

.ajanlatkero-consent-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 5px;
    margin-left: 32px;
    display: none;
}

.ajanlatkero-consent-item.error .ajanlatkero-consent-error {
    display: block;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .ajanlatkero-form {
        padding: 20px;
    }
    
    .ajanlatkero-section-title {
        font-size: 18px;
    }
    
    .price-row.price-total {
        font-size: 18px;
    }
    
    .wpcf7-submit {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .ajanlatkero-form-wrapper {
        padding: 10px;
    }
    
    .ajanlatkero-form {
        padding: 15px;
    }
    
    .price-row {
        font-size: 14px;
    }
}
