
/* Specialty Selection Styles */
.nvm-reg-specialty-instruction {
    color: #666;
    font-style: italic;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-right: 3px solid #007cba;
}

.nvm-reg-specialty-service-group {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.nvm-reg-specialty-service-title {
    color: #333;
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #007cba;
}

.nvm-reg-specialty-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.nvm-reg-specialty-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.nvm-reg-specialty-checkbox-label:hover {
    background: #f0f8ff;
    border-color: #007cba;
}

.nvm-reg-specialty-checkbox-label input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
}

.nvm-reg-specialty-checkbox-label input[type="checkbox"]:checked + span {
    font-weight: bold;
    color: #007cba;
}

.nvm-reg-specialty-checkbox-label:has(input[type="checkbox"]:checked) {
    background: #e3f2fd;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Specialty counter */
.nvm-reg-specialty-counter {
    background: #007cba;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
}

.nvm-reg-specialty-counter.warning {
    background: #ff9800;
}

.nvm-reg-specialty-counter.error {
    background: #f44336;
}

/* Mobile responsive for specialty selection */
@media (max-width: 768px) {
    .nvm-reg-specialty-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .nvm-reg-specialty-service-group {
        padding: 10px;
    }
}

/* Admin Only Fields Styling */
.nvm-reg-admin-only-section {
    background: linear-gradient(135deg, #fff3e0 0%, #f3e5f5 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.15);
}

.nvm-reg-admin-only-section::before {
    content: "🔒";
    position: absolute;
    top: -10px;
    right: 15px;
    background: #ff9800;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.3);
}

.nvm-reg-admin-only-section h3 {
    color: #e65100;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.nvm-reg-admin-only-section .nvm-reg-form-group {
    margin-bottom: 20px;
}

.nvm-reg-admin-only-section .nvm-reg-form-group label {
    color: #e65100;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.nvm-reg-admin-only-section .nvm-reg-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ffb74d;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    direction: rtl;
    text-align: right;
}

.nvm-reg-admin-only-section .nvm-reg-form-group input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
    background: white;
    transform: translateY(-1px);
}

.nvm-reg-admin-only-section .nvm-reg-form-group input::placeholder {
    color: #ffb74d;
    font-style: italic;
}

/* Admin section responsive design */
@media (max-width: 768px) {
    .nvm-reg-admin-only-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .nvm-reg-admin-only-section h3 {
        font-size: 16px;
        padding: 8px;
    }
    
    .nvm-reg-admin-only-section .nvm-reg-form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Custom Specialty Request Styles */
.nvm-reg-custom-specialty-request {
    margin-top: 15px;
    padding: 10px 0;
}

.nvm-reg-custom-specialty-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px dashed #0073aa;
    transition: all 0.3s ease;
}

.nvm-reg-custom-specialty-link:hover {
    color: #005177;
    border-bottom-color: #005177;
    text-decoration: none;
}

.nvm-reg-custom-specialty-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    margin-top: 10px;
    direction: rtl;
    text-align: right;
}

.nvm-reg-custom-specialty-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.nvm-reg-custom-specialty-form input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    margin-bottom: 10px;
    direction: rtl;
}

.nvm-reg-custom-specialty-form input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.nvm-reg-custom-specialty-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.nvm-reg-custom-specialty-actions .button {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nvm-reg-custom-specialty-actions .button-primary {
    background: #0073aa;
    color: white;
    border: 1px solid #0073aa;
}

.nvm-reg-custom-specialty-actions .button-primary:hover {
    background: #005177;
    border-color: #005177;
}

.nvm-reg-custom-specialty-actions .button:not(.button-primary) {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ccc;
}

.nvm-reg-custom-specialty-actions .button:not(.button-primary):hover {
    background: #e1e1e1;
    border-color: #999;
}

.nvm-reg-custom-specialty-message {
    padding: 10px;
    border-radius: 3px;
    font-size: 14px;
    margin-top: 10px;
}

.nvm-reg-custom-specialty-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.nvm-reg-custom-specialty-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive design for custom specialty form */
@media (max-width: 768px) {
    .nvm-reg-custom-specialty-actions {
        flex-direction: column;
    }
    
    .nvm-reg-custom-specialty-actions .button {
        width: 100%;
        text-align: center;
    }
}

/* Contenteditable Editor Styling */
.nvm-reg-contenteditable-area {
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    padding: 12px !important;
    min-height: 120px !important;
    direction: rtl !important;
    text-align: right !important;
    font-family: Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    background: #fff !important;
    transition: border-color 0.3s ease !important;
}

.nvm-reg-contenteditable-area:focus {
    border-color: #007cba !important;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2) !important;
    outline: none !important;
}

.nvm-reg-contenteditable-area:empty:before {
    content: attr(data-placeholder);
    color: #999;
    font-style: italic;
}

/* Responsive contenteditable */
@media (max-width: 768px) {
    .nvm-reg-contenteditable-area {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Forgot Password Link Styling */
.nvm-reg-forgot-password-link {
    text-align: left;
    margin-top: 8px;
}

.nvm-reg-forgot-password-link a {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px dashed #0073aa;
    transition: all 0.3s ease;
}

.nvm-reg-forgot-password-link a:hover {
    color: #005177;
    border-bottom-color: #005177;
    text-decoration: none;
}

/* Forgot Password Popup Styling */
.nvm-reg-forgot-password-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    direction: rtl;
}

.nvm-reg-forgot-password-popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nvm-reg-forgot-password-popup-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.nvm-reg-forgot-password-popup-close:hover {
    background-color: #f0f0f0;
}

.nvm-reg-forgot-password-popup h2 {
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    color: #333;
    font-size: 20px;
}

.nvm-reg-forgot-password-popup p {
    margin-bottom: 20px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}


.nvm-reg-forgot-password-form .nvm-reg-form-group {
    margin-bottom: 20px;
}

.nvm-reg-forgot-password-form .nvm-reg-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.nvm-reg-forgot-password-form .nvm-reg-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    direction: rtl;
    text-align: right;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.nvm-reg-forgot-password-form .nvm-reg-form-group input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.nvm-reg-forgot-password-form .nvm-reg-form-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.nvm-reg-forgot-password-form button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.nvm-reg-forgot-password-form .nvm-reg-btn-primary {
    background-color: #007cba;
    color: white;
}

.nvm-reg-forgot-password-form .nvm-reg-btn-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.nvm-reg-forgot-password-form .nvm-reg-btn-secondary {
    background-color: #6c757d;
    color: white;
}

.nvm-reg-forgot-password-form .nvm-reg-btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Loading state for forgot password buttons */
.nvm-reg-forgot-password-form button.loading {
    position: relative;
    color: transparent;
}

.nvm-reg-forgot-password-form button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive design for forgot password popup */
@media (max-width: 768px) {
    .nvm-reg-forgot-password-popup-content {
        width: 95%;
        padding: 20px;
        max-height: 90vh;
    }
    
    .nvm-reg-forgot-password-form .nvm-reg-form-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .nvm-reg-forgot-password-form button {
        width: 100%;
        max-width: 250px;
    }
    
    .nvm-reg-forgot-password-popup h2 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .nvm-reg-forgot-password-popup-content {
        padding: 15px;
    }
    
    .nvm-reg-forgot-password-form .nvm-reg-form-group input {
        padding: 10px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Admin Edit Pending Changes - Dual Submit Buttons */
#hebrew-registration-save-pending-btn-top,
#hebrew-registration-save-pending-btn-bottom {
    background-color: #ff9800;
    border-color: #ff9800;
}

#hebrew-registration-save-pending-btn-top:hover,
#hebrew-registration-save-pending-btn-bottom:hover {
    background-color: #e68900;
    border-color: #e68900;
}

#hebrew-registration-approve-btn-top,
#hebrew-registration-approve-btn-bottom {
    background-color: #28a745;
    border-color: #28a745;
}

#hebrew-registration-approve-btn-top:hover,
#hebrew-registration-approve-btn-bottom:hover {
    background-color: #218838;
    border-color: #218838;
}

/* =========================================================================
   Image Crop Modal
   ========================================================================= */

.nvm-reg-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.82);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: nvmCropFadeIn 0.3s ease;
}

@keyframes nvmCropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.nvm-reg-crop-modal-content {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 700px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: nvmCropSlideUp 0.3s ease;
    direction: rtl;
    text-align: right;
}

@keyframes nvmCropSlideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.nvm-reg-crop-modal-content h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.nvm-reg-crop-modal-content > p {
    margin: 0 0 16px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Close Button */
.nvm-reg-crop-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 5;
}

.nvm-reg-crop-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Crop Container — shows the full image */
.nvm-reg-crop-container {
    position: relative;
    width: 100%;
    margin: 0 auto 16px;
    overflow: hidden;
    border-radius: 8px;
    background: #1a1a2e;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.nvm-reg-crop-container:active {
    cursor: grabbing;
}

/* The draggable image */
#nvm-reg-crop-image {
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    contain: layout style;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Overlay layer (sits on top of the image) */
.nvm-reg-crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* The transparent crop frame — everything outside is darkened */
.nvm-reg-crop-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.55);
    pointer-events: none;
    z-index: 2;
}

/* Zoom Controls */
.nvm-reg-crop-zoom-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    margin-bottom: 16px;
}

.nvm-reg-crop-zoom-container label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    margin: 0;
}

#nvm-reg-crop-zoom {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: linear-gradient(to left, #007cba 0%, #e0e0e0 0%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

#nvm-reg-crop-zoom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #007cba;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#nvm-reg-crop-zoom::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(0, 124, 186, 0.4);
}

#nvm-reg-crop-zoom::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #007cba;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 124, 186, 0.3);
}

/* Action Buttons */
.nvm-reg-crop-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.nvm-reg-crop-actions button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.nvm-reg-crop-actions .nvm-reg-btn-secondary {
    background: #f0f0f0;
    color: #555;
}
.nvm-reg-crop-actions .nvm-reg-btn-secondary:hover {
    background: #e0e0e0;
}

.nvm-reg-crop-actions .nvm-reg-btn-info {
    background: #17a2b8;
    color: #fff;
}
.nvm-reg-crop-actions .nvm-reg-btn-info:hover {
    background: #138496;
}

.nvm-reg-crop-actions .nvm-reg-btn-primary {
    background: #007cba;
    color: #fff;
}
.nvm-reg-crop-actions .nvm-reg-btn-primary:hover {
    background: #005f8a;
}

/* Responsive */
@media (max-width: 560px) {
    .nvm-reg-crop-modal-content {
        padding: 16px;
        border-radius: 12px;
    }
    .nvm-reg-crop-modal-content h3 {
        font-size: 18px;
    }
    .nvm-reg-crop-container {
        max-height: 50vh;
    }
    .nvm-reg-crop-actions {
        flex-direction: column;
    }
    .nvm-reg-crop-actions button {
        width: 100%;
    }
}

