/* Plugin Tư Vấn Dinh Dưỡng - Frontend Styles */
/* Prefix: ptvdd- để tránh conflict với plugin khác */
/* Màu chủ đạo: #ed4f84 */

.ptvdd-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ptvdd-container {
    background: linear-gradient(135deg, #fff 0%, #fff5f8 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(237, 79, 132, 0.15);
    padding: 40px;
    border: 1px solid rgba(237, 79, 132, 0.1);
}

.ptvdd-title {
    color: #ed4f84;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(237, 79, 132, 0.1);
}

.ptvdd-description {
    color: #666;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 35px;
    text-align: center;
    padding: 15px;
    background: rgba(237, 79, 132, 0.05);
    border-radius: 8px;
    border-left: 4px solid #ed4f84;
}

.ptvdd-description small {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #999;
}

/* Form Info Section */
.ptvdd-form-info-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px dashed #ed4f84;
}

.ptvdd-form-info-section .ptvdd-form-group {
    margin-bottom: 0;
}

.ptvdd-help-text {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.ptvdd-section {
    margin-bottom: 35px;
    padding: 25px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.ptvdd-section:hover {
    box-shadow: 0 4px 16px rgba(237, 79, 132, 0.1);
    transform: translateY(-2px);
}

.ptvdd-section:last-child {
    border-bottom: none;
}

.ptvdd-section-title {
    color: #ed4f84;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 3px solid #ed4f84;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ptvdd-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #ed4f84 0%, #d43d6f 100%);
    border-radius: 2px;
}

.ptvdd-form-group {
    margin-bottom: 22px;
}

.ptvdd-form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 15px;
}

.ptvdd-required {
    color: #ed4f84;
    font-weight: 700;
}

.ptvdd-form-group input[type="text"],
.ptvdd-form-group input[type="email"],
.ptvdd-form-group input[type="tel"],
.ptvdd-form-group input[type="number"],
.ptvdd-form-group input[type="date"],
.ptvdd-form-group select,
.ptvdd-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fff;
}

.ptvdd-form-group input[readonly] {
    background: #f8f9fa;
    cursor: not-allowed;
}

.ptvdd-form-group input:focus,
.ptvdd-form-group select:focus,
.ptvdd-form-group textarea:focus {
    outline: none;
    border-color: #ed4f84;
    box-shadow: 0 0 0 4px rgba(237, 79, 132, 0.1);
    transform: translateY(-1px);
}

.ptvdd-form-group textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.6;
}

.ptvdd-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.ptvdd-checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.ptvdd-checkbox-group label:hover {
    background: #fff5f8;
    border-color: #ed4f84;
    transform: translateX(4px);
}

.ptvdd-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #ed4f84;
    flex-shrink: 0;
}

.ptvdd-checkbox-group input[type="checkbox"]:checked + label,
.ptvdd-checkbox-group label:has(input:checked) {
    background: #fff5f8;
    border-color: #ed4f84;
    font-weight: 600;
}

.ptvdd-other-input {
    margin-top: 12px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ptvdd-form-group input[type="range"] {
    width: 100%;
    margin: 15px 0;
    accent-color: #ed4f84;
    height: 8px;
}

.ptvdd-range-value {
    display: inline-block;
    margin-left: 12px;
    font-weight: 700;
    color: #ed4f84;
    min-width: 35px;
    font-size: 18px;
    padding: 4px 12px;
    background: #fff5f8;
    border-radius: 6px;
}

.ptvdd-form-actions {
    margin-top: 40px;
    text-align: center;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.ptvdd-btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(237, 79, 132, 0.3);
}

.ptvdd-btn-primary {
    background: linear-gradient(135deg, #ed4f84 0%, #d43d6f 100%);
    color: #fff;
}

.ptvdd-btn-primary:hover {
    background: linear-gradient(135deg, #d43d6f 0%, #c02d5a 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(237, 79, 132, 0.4);
}

.ptvdd-btn-primary:active {
    transform: translateY(-1px);
}

.ptvdd-message {
    margin-top: 25px;
    padding: 18px 24px;
    border-radius: 12px;
    display: none;
    font-size: 15px;
    font-weight: 500;
    animation: slideIn 0.4s ease;
    border-left: 4px solid;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ptvdd-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
    display: block;
}

.ptvdd-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
    display: block;
}

/* Search Results */
.ptvdd-search-results {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(237, 79, 132, 0.1);
    border: 1px solid rgba(237, 79, 132, 0.1);
}

.ptvdd-search-results h3 {
    color: #ed4f84;
    margin-bottom: 25px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 3px solid #ed4f84;
}

.ptvdd-consultation-item {
    background: #fff;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 12px;
    border-left: 5px solid #ed4f84;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.ptvdd-consultation-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(237, 79, 132, 0.2);
}

.ptvdd-consultation-item h4 {
    color: #ed4f84;
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
    padding-bottom: 10px;
    border-bottom: 2px solid #fff5f8;
}

.ptvdd-consultation-item .ptvdd-info-row {
    margin-bottom: 12px;
    font-size: 15px;
    color: #495057;
    line-height: 1.6;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ptvdd-consultation-item .ptvdd-info-row:last-child {
    border-bottom: none;
}

.ptvdd-consultation-item .ptvdd-info-label {
    font-weight: 700;
    color: #333;
    display: inline-block;
    min-width: 180px;
    color: #ed4f84;
}

.ptvdd-consultation-item .ptvdd-expert-note {
    background: #fff5f8;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 10px;
    border-left: 3px solid #ed4f84;
}

.ptvdd-consultation-item .ptvdd-expert-note .ptvdd-info-label {
    color: #d43d6f;
}

/* Responsive */
@media (max-width: 768px) {
    .ptvdd-wrapper {
        padding: 10px;
    }
    
    .ptvdd-container {
        padding: 25px 20px;
    }
    
    .ptvdd-title {
        font-size: 22px;
    }
    
    .ptvdd-section-title {
        font-size: 18px;
    }
    
    .ptvdd-section {
        padding: 20px 15px;
    }
    
    .ptvdd-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .ptvdd-consultation-item .ptvdd-info-label {
        min-width: 100%;
        display: block;
        margin-bottom: 5px;
    }
    
    .ptvdd-btn {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
    }
}

/* Loading state */
.ptvdd-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ptvdd-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ed4f84;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
