/* ==========================================================================
   FORMULARIOS DE USUARIO - CSS
   ========================================================================== */

/* Container Principal */
.vme-form-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.vme-form-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* Header del Formulario */
.vme-form-header {
    text-align: center;
    margin-bottom: 30px;
}

.vme-form-header h2 {
    font-size: 28px;
    color: #333;
    margin: 0 0 10px 0;
}

.vme-form-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Google Login */
.vme-google-login {
    margin-bottom: 30px;
}

.vme-button-google {
    width: 100%;
    background: white;
    color: #444;
    border: 2px solid #ddd;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    transition: all 0.3s;
}

.vme-button-google:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

.vme-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 25px 0;
}

.vme-divider::before,
.vme-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.vme-divider span {
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* Formulario */
.vme-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vme-form-group {
    display: flex;
    flex-direction: column;
}

.vme-form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.vme-label-required::after {
    content: ' *';
    color: #f44336;
}

.vme-input,
.vme-textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

/* v6.3.16 - Fix para select: aumentar altura para mostrar texto completo */
select.vme-input {
    height: 48px;
    line-height: 24px;
    padding-top: 11px;
    padding-bottom: 11px;
}

.vme-input:focus,
.vme-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.vme-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Password Input con Toggle */
.vme-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.vme-password-wrapper .vme-input {
    flex: 1;
    padding-right: 45px;
}

.vme-toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #666;
    transition: color 0.3s;
}

.vme-toggle-password:hover {
    color: #4CAF50;
}

.vme-toggle-password .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Password Strength */
.vme-password-strength {
    margin-top: 8px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.vme-password-strength-bar {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
}

.vme-password-strength-bar.weak {
    width: 33%;
    background: #f44336;
}

.vme-password-strength-bar.medium {
    width: 66%;
    background: #FF9800;
}

.vme-password-strength-bar.strong {
    width: 100%;
    background: #4CAF50;
}

/* Password Requirements */
.vme-password-requirements {
    margin-top: 10px;
}

.vme-password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.vme-password-requirements li {
    color: #999;
    font-size: 13px;
    transition: color 0.3s;
}

.vme-password-requirements li.valid {
    color: #4CAF50;
}

/* Help Text */
.vme-help-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
}

/* User Type Selector */
.vme-user-type-selector .vme-radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.vme-radio-card {
    position: relative;
    cursor: pointer;
}

.vme-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.vme-radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: all 0.3s;
}

.vme-radio-card input[type="radio"]:checked + .vme-radio-content {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.vme-radio-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.vme-radio-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.vme-radio-desc {
    font-size: 13px;
    color: #666;
}

/* File Upload */
.vme-file-upload {
    position: relative;
}

.vme-file-input {
    display: none;
}

.vme-file-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.vme-file-label:hover {
    border-color: #4CAF50;
    background: #f1f8f4;
}

.vme-file-label .dashicons {
    font-size: 24px;
}

.vme-photo-preview {
    position: relative;
    margin-top: 15px;
    text-align: center;
}

.vme-photo-preview img {
    max-width: 200px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vme-remove-photo {
    position: absolute;
    top: -10px;
    right: calc(50% - 110px);
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

/* Checkbox */
.vme-checkbox-group {
    margin: 20px 0;
}

.vme-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.vme-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.vme-checkbox-label span {
    flex: 1;
    font-size: 14px;
    color: #666;
}

/* Buttons */
.vme-button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vme-button-primary {
    background: #4CAF50;
    color: white;
}

.vme-button-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.vme-button-block {
    width: 100%;
}

body.vme-active .vme-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.vme-button-loading {
    display: none;
}

.vme-button.loading .vme-button-text {
    display: none;
}

.vme-button.loading .vme-button-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Spinner */
.vme-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Footer */
.vme-form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.vme-form-footer p {
    color: #666;
    font-size: 14px;
}

.vme-form-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
}

.vme-form-footer a:hover {
    text-decoration: underline;
}

/* Form Sections */
.vme-form-section {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.vme-form-section h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

/* Form Row */
.vme-form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
}

.vme-link {
    color: #2196F3;
    text-decoration: none;
    font-size: 14px;
}

.vme-link:hover {
    text-decoration: underline;
}

/* Messages */
.vme-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.vme-message.vme-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.vme-message.vme-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.vme-message.vme-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.vme-message.vme-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Modal */
.vme-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
}

.vme-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.vme-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.vme-modal-close:hover {
    color: #333;
}

/* ==========================================================================
   PERFIL DE USUARIO
   ========================================================================== */

.vme-profile-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.vme-profile-header {
    text-align: center;
    margin-bottom: 40px;
}

.vme-profile-header h1 {
    font-size: 32px;
    color: #333;
    margin: 0 0 10px 0;
}

.vme-profile-header p {
    color: #666;
    font-size: 16px;
}

.vme-profile-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

/* Sidebar de Foto */
.vme-profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vme-profile-photo-card,
.vme-profile-info-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vme-profile-photo-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
}

.vme-profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vme-profile-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.vme-profile-photo-wrapper:hover .vme-profile-photo-overlay {
    opacity: 1;
}

.vme-upload-icon {
    color: white;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.vme-upload-icon .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.vme-profile-info-card h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.vme-profile-info-card p {
    margin: 10px 0;
    font-size: 14px;
    color: #666;
}

/* Tabs */
.vme-profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.vme-tab-button {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vme-tab-button:hover {
    color: #4CAF50;
}

.vme-tab-button.active {
    color: #4CAF50;
    border-bottom-color: #4CAF50;
}

.vme-tab-content {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.vme-tab-content.active {
    display: block;
}

/* Responsive */
@media (max-width: 992px) {
    .vme-profile-grid {
        grid-template-columns: 1fr;
    }
    
    .vme-profile-sidebar {
        flex-direction: row;
    }
    
    .vme-profile-photo-card,
    .vme-profile-info-card {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .vme-form-wrapper {
        padding: 25px;
    }
    
    .vme-user-type-selector .vme-radio-group {
        grid-template-columns: 1fr;
    }
    
    .vme-profile-sidebar {
        flex-direction: column;
    }
    
    .vme-profile-tabs {
        flex-direction: column;
    }
    
    .vme-tab-button {
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .vme-tab-button.active {
        border-left-color: #4CAF50;
    }
}
