/* Login Popup Modal Styles - Inheriting WordPress Design */

/* Modal Overlay */
.lpm-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    animation: lpm-fade-in 0.3s ease-out;
}

.lpm-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Modal Container */
.lpm-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 90%;
    min-height: 380px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: lpm-slide-in 0.3s ease-out;
}

/* Modal Header - Minimal */
.lpm-modal-header {
    padding: 15px 20px 0;
    position: relative;
    border-bottom: none;
    background: transparent;
}

.lpm-modal-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: absolute;
    top: 15px;
    right: 15px;
}

.lpm-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: scale(1.1);
}

/* Modal Title - Inside Body */
.lpm-modal-title {
    margin: 0 0 30px 0;
    font-size: 1.4em;
    color: #243c3c;
    font-weight: 600;
    text-align: center;
}

/* Modal Body */
.lpm-modal-body {
    padding: 30px 40px 40px;
    background-color: #fff;
}

/* Form Styles - Modern Design */
.lpm-login-form {
    margin: 0;
}

.lpm-form-group {
    margin-bottom: 24px;
    position: relative;
}

.lpm-form-group label {
    display: none; /* Hide labels, we'll use placeholders */
}

.lpm-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.lpm-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #243c3c;
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.7;
}

.lpm-form-group input[type="text"],
.lpm-form-group input[type="password"] {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #d4ccc4;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.4;
    color: #243c3c;
    background-color: #fff;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-weight: 400;
}

.lpm-form-group input[type="text"]:focus,
.lpm-form-group input[type="password"]:focus {
    border-color: #243c3c;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(36, 60, 60, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.lpm-form-group input[type="text"]::placeholder,
.lpm-form-group input[type="password"]::placeholder {
    color: #8a817a;
    font-weight: 400;
}

/* Checkbox Group */
.lpm-checkbox-group {
    margin-bottom: 30px;
}

.lpm-checkbox-group label {
    display: flex !important;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    color: #243c3c;
    font-size: 14px;
}

.lpm-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 0;
    width: 18px;
    height: 18px;
    accent-color: #243c3c;
}

/* Login Button - Green Style */
.lpm-login-button {
    background: linear-gradient(135deg, #98c82f 0%, #85b525 100%);
    border: none;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    line-height: 1.4;
    min-height: 50px;
    margin: 0;
    padding: 0 24px;
    cursor: pointer;
    border-radius: 25px;
    white-space: nowrap;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(152, 200, 47, 0.3);
    position: relative;
    overflow: hidden;
}

.lpm-login-button:hover {
    background: linear-gradient(135deg, #85b525 0%, #72a220 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(152, 200, 47, 0.4);
}

.lpm-login-button:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(152, 200, 47, 0.4), 0 0 0 3px rgba(152, 200, 47, 0.2);
}

.lpm-login-button:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lpm-login-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Spinner for loading state */
.lpm-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: lpm-spin 1s ease-in-out infinite;
}

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

/* Form Links */
.lpm-form-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #d4ccc4;
}

.lpm-form-links a {
    color: #243c3c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.lpm-form-links a:hover {
    color: #f43454;
    text-decoration: underline;
}

/* Message Styles */
.lpm-message {
    display: none; /* We'll use button spinner instead */
}

.lpm-message.error {
    display: block;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    background-color: #ffe6e6;
    border: 1px solid #f43454;
    color: #f43454;
    text-align: center;
}

.lpm-message.success {
    display: block;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    background-color: #e6ffe6;
    border: 1px solid #00b894;
    color: #00b894;
    text-align: center;
}

/* Animations */
@keyframes lpm-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes lpm-slide-in {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */

/* Tablet styles */
@media (max-width: 768px) {
    .lpm-modal {
        max-width: 380px;
        width: 85%;
        min-height: 350px;
    }
    
    .lpm-modal-header {
        padding: 12px 18px 0;
    }
    
    .lpm-modal-body {
        padding: 25px 30px 35px;
    }
    
    .lpm-form-group input[type="text"],
    .lpm-form-group input[type="password"] {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* Better touch target */
    }
    
    .lpm-login-button {
        min-height: 48px; /* Better touch target */
        font-size: 16px;
    }
}

/* Mobile styles */
@media (max-width: 480px) {
    .lpm-modal {
        margin: 10px;
        width: calc(100% - 20px);
        max-width: none;
        min-height: 320px;
        border-radius: 12px;
    }
    
    .lpm-modal-header {
        padding: 10px 15px 0;
    }
    
    .lpm-modal-title {
        font-size: 1.3em;
    }
    
    .lpm-modal-close {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
        font-size: 16px;
    }
    
    .lpm-modal-body {
        padding: 20px 25px 30px;
    }
    
    .lpm-form-group {
        margin-bottom: 20px;
    }
    
    .lpm-form-group input[type="text"],
    .lpm-form-group input[type="password"] {
        padding: 14px 14px 14px 45px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 44px; /* iOS recommended touch target */
        border-radius: 8px;
    }
    
    .lpm-input-icon {
        left: 14px;
        font-size: 16px;
    }
    
    .lpm-login-button {
        min-height: 50px; /* Good touch target for mobile */
        font-size: 16px;
        padding: 0 20px;
        border-radius: 25px;
    }
    
    .lpm-checkbox-group {
        margin-bottom: 25px;
    }
    
    .lpm-checkbox-group input[type="checkbox"] {
        width: 20px; /* Larger for mobile touch */
        height: 20px;
    }
    
    .lpm-form-links {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .lpm-form-links a {
        font-size: 15px;
        padding: 8px; /* Larger touch area */
        display: inline-block;
    }
}

/* Small mobile devices */
@media (max-width: 360px) {
    .lpm-modal {
        margin: 5px;
        width: calc(100% - 10px);
        min-height: 400px;
    }
    
    .lpm-modal-header {
        padding: 25px 20px 15px;
    }
    
    .lpm-modal-header h2 {
        font-size: 1.2em;
    }
    
    .lpm-modal-body {
        padding: 15px 20px 25px;
    }
    
    .lpm-form-group input[type="text"],
    .lpm-form-group input[type="password"] {
        padding: 12px 12px 12px 42px;
        min-height: 42px;
    }
    
    .lpm-input-icon {
        left: 12px;
        font-size: 15px;
    }
    
    .lpm-login-button {
        min-height: 48px;
        font-size: 15px;
    }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .lpm-modal {
        max-height: 85vh;
        overflow-y: auto;
        min-height: auto;
    }
    
    .lpm-modal-header {
        padding: 20px 30px 15px;
    }
    
    .lpm-modal-header h2 {
        font-size: 1.2em;
    }
    
    .lpm-modal-body {
        padding: 15px 30px 25px;
    }
    
    .lpm-form-group {
        margin-bottom: 15px;
    }
    
    .lpm-checkbox-group {
        margin-bottom: 20px;
    }
}

/* Reset Modal Specific Styles - Match the new minimal header design */
#lpm-reset-modal-overlay .lpm-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 420px;
    width: 90%;
    min-height: 380px;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    animation: lpm-slide-in 0.3s ease-out;
}

#lpm-reset-modal-overlay .lpm-modal-header {
    padding: 15px 20px 0;
    position: relative;
    border-bottom: none;
    background: transparent;
}

#lpm-reset-modal-overlay .lpm-modal-close {
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: absolute;
    top: 15px;
    right: 15px;
}

#lpm-reset-modal-overlay .lpm-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: scale(1.1);
}

#lpm-reset-modal-overlay .lpm-modal-body {
    padding: 30px 40px 40px;
    background-color: #fff;
}

#lpm-reset-modal-overlay .lpm-modal-title {
    margin: 0 0 30px 0;
    font-size: 1.4em;
    color: #243c3c;
    font-weight: 600;
    text-align: center;
}

#lpm-reset-modal-overlay .lpm-form-group {
    margin-bottom: 24px;
    position: relative;
}

#lpm-reset-modal-overlay .lpm-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

#lpm-reset-modal-overlay .lpm-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #243c3c;
    font-size: 18px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.7;
}

#lpm-reset-modal-overlay .lpm-form-group input[type="email"] {
    width: 100%;
    padding: 16px 16px 16px 50px;
    border: 2px solid #d4ccc4;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.4;
    color: #243c3c;
    background-color: #fff;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-weight: 400;
}

#lpm-reset-modal-overlay .lpm-form-group input[type="email"]:focus {
    border-color: #243c3c;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(36, 60, 60, 0.1);
    outline: none;
    transform: translateY(-1px);
}

#lpm-reset-modal-overlay .lpm-form-group input[type="email"]::placeholder {
    color: #8a817a;
    font-weight: 400;
}

#lpm-reset-modal-overlay .lpm-reset-button {
    background: linear-gradient(135deg, #98c82f 0%, #85b525 100%);
    border: none;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    line-height: 1.4;
    min-height: 50px;
    margin: 0;
    padding: 0 24px;
    cursor: pointer;
    border-radius: 25px;
    white-space: nowrap;
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(152, 200, 47, 0.3);
    position: relative;
    overflow: hidden;
}

#lpm-reset-modal-overlay .lpm-reset-button:hover {
    background: linear-gradient(135deg, #85b525 0%, #72a220 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(152, 200, 47, 0.4);
}

#lpm-reset-modal-overlay .lpm-reset-button:focus {
    outline: none;
    box-shadow: 0 6px 20px rgba(152, 200, 47, 0.4), 0 0 0 3px rgba(152, 200, 47, 0.2);
}

#lpm-reset-modal-overlay .lpm-reset-button:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#lpm-reset-modal-overlay .lpm-reset-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

#lpm-reset-modal-overlay .lpm-form-links {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #d4ccc4;
}

#lpm-reset-modal-overlay .lpm-form-links a {
    color: #243c3c;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

#lpm-reset-modal-overlay .lpm-form-links a:hover {
    color: #f43454;
    text-decoration: underline;
}

/* Reset Modal Responsive Design */
@media (max-width: 768px) {
    #lpm-reset-modal-overlay .lpm-modal {
        max-width: 380px;
        width: 85%;
        min-height: 300px;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-header {
        padding: 12px 18px 0;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-body {
        padding: 25px 30px 35px;
    }
    
    #lpm-reset-modal-overlay .lpm-form-group input[type="email"] {
        font-size: 16px;
        min-height: 44px;
    }
    
    #lpm-reset-modal-overlay .lpm-reset-button {
        min-height: 48px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    #lpm-reset-modal-overlay .lpm-modal {
        margin: 10px;
        width: calc(100% - 20px);
        max-width: none;
        min-height: 280px;
        border-radius: 12px;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-header {
        padding: 10px 15px 0;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-title {
        font-size: 1.3em;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-close {
        width: 28px;
        height: 28px;
        top: 10px;
        right: 10px;
        font-size: 16px;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-body {
        padding: 20px 25px 30px;
    }
    
    #lpm-reset-modal-overlay .lpm-form-group {
        margin-bottom: 20px;
    }
    
    #lpm-reset-modal-overlay .lpm-form-group input[type="email"] {
        padding: 14px 14px 14px 45px;
        font-size: 16px;
        min-height: 44px;
        border-radius: 8px;
    }
    
    #lpm-reset-modal-overlay .lpm-input-icon {
        left: 14px;
        font-size: 16px;
    }
    
    #lpm-reset-modal-overlay .lpm-reset-button {
        min-height: 50px;
        font-size: 16px;
        padding: 0 20px;
        border-radius: 25px;
    }
    
    #lpm-reset-modal-overlay .lpm-form-links {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    #lpm-reset-modal-overlay .lpm-form-links a {
        font-size: 15px;
        padding: 8px;
        display: inline-block;
    }
}

@media (max-width: 360px) {
    #lpm-reset-modal-overlay .lpm-modal {
        margin: 5px;
        width: calc(100% - 10px);
        min-height: 400px;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-header {
        padding: 25px 20px 15px;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-header h2 {
        font-size: 1.2em;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-body {
        padding: 15px 20px 25px;
    }
    
    #lpm-reset-modal-overlay .lpm-form-group input[type="email"] {
        padding: 12px 12px 12px 42px;
        min-height: 42px;
    }
    
    #lpm-reset-modal-overlay .lpm-input-icon {
        left: 12px;
        font-size: 15px;
    }
    
    #lpm-reset-modal-overlay .lpm-reset-button {
        min-height: 48px;
        font-size: 15px;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    #lpm-reset-modal-overlay .lpm-modal {
        max-height: 85vh;
        overflow-y: auto;
        min-height: auto;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-header {
        padding: 20px 30px 15px;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-header h2 {
        font-size: 1.2em;
    }
    
    #lpm-reset-modal-overlay .lpm-modal-body {
        padding: 15px 30px 25px;
    }
    
    #lpm-reset-modal-overlay .lpm-form-group {
        margin-bottom: 15px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .lpm-modal {
        border: 0.5px solid rgba(212, 204, 196, 0.3);
    }
}
