/* Horse Breeding Manager - Login Modal Styles */

/* Modal Base */
.hbm-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.25s, opacity 0.25s ease;
}

.hbm-modal[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

/* Overlay */
.hbm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

/* Modal Container */
.hbm-modal-container {
    position: relative;
    width: 90%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.hbm-modal[aria-hidden="false"] .hbm-modal-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.hbm-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #64748b;
    transition: background 0.2s, color 0.2s;
    z-index: 10;
}

.hbm-modal-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

/* Modal Content */
.hbm-modal-content {
    padding: 48px 40px 40px;
}

/* Header */
.hbm-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.hbm-modal-title {
    font-family: "Libre Baskerville", Georgia, serif;
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.02em;
}

.hbm-modal-subtitle {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

/* Form */
.hbm-login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hbm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hbm-form-group label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.hbm-form-group input {
    width: 100%;
    padding: 12px 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    color: #1a1a1a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.hbm-form-group input:focus {
    outline: none;
    background: #fff;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.hbm-form-group input::placeholder {
    color: #94a3b8;
}

/* Form Options Row */
.hbm-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.hbm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #64748b;
}

.hbm-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1a1a1a;
    cursor: pointer;
}

.hbm-forgot-link {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.hbm-forgot-link:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

/* Submit Button */
.hbm-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
}

.hbm-submit-btn:hover {
    background: #333;
}

.hbm-submit-btn:active {
    transform: scale(0.98);
}

/* Footer */
.hbm-modal-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.hbm-modal-footer p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.hbm-modal-footer a {
    color: #1a1a1a;
    font-weight: 500;
    text-decoration: none;
    transition: text-decoration 0.2s;
}

.hbm-modal-footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .hbm-modal-content {
        padding: 40px 24px 32px;
    }
    
    .hbm-modal-title {
        font-size: 24px;
    }
    
    .hbm-form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Prevent body scroll when modal is open */
body.hbm-modal-open {
    overflow: hidden;
}

/* Login Messages */
.hbm-login-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.hbm-message-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.hbm-message-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

