
/* --- Professional Modal Enhancements --- */
body.modal-open {
    overflow: hidden;
}

.modal-content {
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    background: #fff;
    overflow: hidden; /* For rounded corners */
    padding: 0; /* Remove padding here, add to body */
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Default max height */
}

.modal-body-content {
    padding: 30px;
    overflow-y: auto; /* Enable scrolling for content */
    flex-grow: 1;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.modal-brand {
    display: none; /* Hide default brand in favor of new header */
}

/* New Professional Header */
.modal-header-pro {
    background: linear-gradient(135deg, var(--primary-color, #ff9933), #ff7733);
    padding: 25px 30px;
    color: white;
    position: relative;
    text-align: center;
}

.modal-header-pro .brand-logo {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    padding: 5px;
    margin: 0 auto 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-header-pro .brand-logo img {
    max-width: 100%;
    max-height: 100%;
}

.modal-header-pro h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-header-pro p {
    color: rgba(255, 255, 255, 0.9);
    margin: 5px 0 0;
    font-size: 0.9rem;
}

.close-modal-pro {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.close-modal-pro:hover {
    background: white;
    color: var(--primary-color, #ff9933);
    transform: rotate(90deg);
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0; /* Gap handled by form-group */
}

.form-row .form-group {
    flex: 1;
}

.modal .form-group {
    margin-bottom: 20px;
    position: relative;
}

/* Input Styling */
.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    transition: color 0.3s ease;
    font-size: 16px;
    pointer-events: none;
    z-index: 2;
}

.modal .form-input {
    width: 100%;
    padding: 12px 15px 12px 45px; /* Space for icon */
    background: #f8f9fa;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #333;
    transition: all 0.3s ease;
}

.modal .form-input.password-input {
    padding-right: 45px; /* Space for toggle icon */
}

.modal .form-input:focus {
    background: #fff;
    border-color: var(--primary-color, #ff9933);
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.1);
    outline: none;
}

.modal .form-input::placeholder {
    color: #bbb;
}

.input-group:focus-within .input-icon {
    color: var(--primary-color, #ff9933);
}

/* Password Toggle Icon */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-color, #ff9933);
}

/* Checkbox Styling */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.checkbox-wrapper input[type="checkbox"] {
    accent-color: var(--primary-color, #ff9933);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-wrapper a {
    color: var(--primary-color, #ff9933);
    text-decoration: none;
    font-weight: 600;
}

/* Button Styling */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color, #ff9933), #ff7733);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 153, 51, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 153, 51, 0.4);
}

.btn-submit i {
    font-size: 1.2rem;
}

.modal-footer-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

.modal-footer-text a {
    color: var(--primary-color, #ff9933);
    font-weight: 700;
    text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .modal-body-content {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .modal-header-pro {
        padding: 20px;
    }

    .modal-header-pro h2 {
        font-size: 1.3rem;
    }
}
