/**
 * Entity Validation Modal Styles
 * Matches existing HI theme styling
 */

/* Login Form Links - Match Join the Club styling */
.hi-auth-links {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.hi-auth-links .hi-auth-footer-link {
    background: none;
    border: none;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding: 8px 16px;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.hi-auth-links .hi-auth-footer-link:hover {
    color: #2563eb;
    text-decoration: underline;
    transform: translateY(-1px);
}

.hi-auth-links .hi-auth-footer-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Modal Form Elements */
.hi-form-group {
    margin-bottom: 16px;
}

.hi-form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    outline: none;
    box-shadow: none;
}

.hi-form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hi-form-result {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.hi-form-result .error {
    color: #dc2626;
}

.hi-form-result:not(.error) {
    color: #059669;
}

/* Modal Actions */
.hi-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.hi-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hi-btn-primary {
    background: #3b82f6;
    color: white;
}

.hi-btn-primary:hover {
    background: #2563eb;
}

.hi-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.hi-btn-secondary:hover {
    background: #e5e7eb;
}

/* Remove any green borders from existing theme overrides - AGGRESSIVE */
.hi-entity-modal input,
.hi-entity-modal textarea,
.hi-entity-modal select,
.hi-form-control,
.hi-entity-modal .hi-form-group input,
.hi-entity-modal .hi-form-group textarea,
.hi-entity-modal .hi-form-group select,
input[type="email"],
input[type="text"],
input[type="password"] {
    border: 1px solid #e5e7eb !important;
    border-bottom: 1px solid #e5e7eb !important;
    border-color: #e5e7eb !important;
    border-bottom-color: #e5e7eb !important;
    outline: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    border-image: none !important;
    border-image-source: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

.hi-entity-modal input:focus,
.hi-entity-modal textarea:focus,
.hi-entity-modal select:focus,
.hi-form-control:focus,
.hi-entity-modal .hi-form-group input:focus,
.hi-entity-modal .hi-form-group textarea:focus,
.hi-entity-modal .hi-form-group select:focus,
input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
    border: 1px solid #3b82f6 !important;
    border-bottom: 1px solid #3b82f6 !important;
    border-color: #3b82f6 !important;
    border-bottom-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
    border-image: none !important;
    -webkit-box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    -moz-box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Remove any green bottom borders specifically - AGGRESSIVE */
.hi-entity-modal input::after,
.hi-entity-modal textarea::after,
.hi-entity-modal select::after,
.hi-form-control::after,
.hi-entity-modal input::before,
.hi-entity-modal textarea::before,
.hi-entity-modal select::before,
.hi-form-control::before {
    border-bottom-color: #e5e7eb !important;
    border-color: #e5e7eb !important;
    content: none !important;
}

/* Target any element with green color */
.hi-entity-modal * {
    border-color: #e5e7eb !important;
}

.hi-entity-modal *:focus {
    border-color: #3b82f6 !important;
}

/* Modal Overlay */
.hi-entity-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

/* Modal Container */
.hi-entity-modal {
    background: white;
    border-radius: 8px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Modal Header */
.hi-entity-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.hi-entity-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.hi-entity-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hi-entity-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Modal Body */
.hi-entity-modal-body {
    padding: 24px;
}

.hi-entity-modal-body p {
    margin: 0 0 16px 0;
    color: #374151;
    line-height: 1.5;
}

.hi-entity-modal-body strong {
    color: #111827;
}

/* Form Elements */
.hi-form-group {
    margin-bottom: 16px;
}

.hi-form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.hi-form-control:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.hi-form-result {
    margin-top: 16px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
}

.hi-form-result.error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.hi-form-result:not(.error) {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hi-form-result ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

/* Modal Actions */
.hi-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Buttons - Matching existing theme */
.hi-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hi-btn-primary {
    background: #3b82f6;
    color: white;
}

.hi-btn-primary:hover {
    background: #2563eb;
}

.hi-btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.hi-btn-secondary:hover {
    background: #e5e7eb;
}

.hi-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 640px) {
    .hi-entity-modal {
        width: 95%;
        margin: 16px;
    }
    
    .hi-entity-modal-header,
    .hi-entity-modal-body {
        padding: 16px;
    }
    
    .hi-modal-actions {
        flex-direction: column;
    }
    
    .hi-btn {
        width: 100%;
    }
}

/* Animation */
.hi-entity-modal-overlay {
    animation: fadeIn 0.2s ease;
}

.hi-entity-modal {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}
