/* ============================================
   Auth Modal Styles (Login/Register/Forgot)
   ============================================ */

/* Modal Dialog Sizing */
#modalLogin .modal-dialog {
    max-width: 500px;
}

/* Modal Content Base */
.cym-auth-modal {
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.cym-auth-modal .modal-header {
    padding: 1.5rem 1.5rem 0;
}

.cym-auth-modal .modal-header .close {
    font-size: 1.8rem;
    font-weight: 300;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 0;
    margin: 0;
}

.cym-auth-modal .modal-header .close:hover {
    opacity: 0.8;
}

/* User Type Selection Cards */
.user-type-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.user-type-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    outline: none;
    /* Better touch targets for mobile */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 80px;
}

.user-type-card:hover {
    border-color: #3A6D8C;
    background: #f0f7fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 109, 140, 0.15);
}

.user-type-card:active {
    transform: translateY(0);
    background: #e6f2f7;
    border-color: #2F5A72;
}

.user-type-card:focus {
    outline: 2px solid #3A6D8C;
    outline-offset: 2px;
}

.user-type-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 12px;
    color: #666;
    transition: all 0.3s ease;
}

.user-type-card:hover .user-type-icon {
    background: linear-gradient(135deg, #3A6D8C 0%, #2F5A72 100%);
    color: #fff;
}

.user-type-content {
    flex: 1;
}

.user-type-content h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.user-type-content p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    margin-top: 0.25rem;
}

.user-type-arrow {
    flex-shrink: 0;
    font-size: 1.5rem;
    color: #3A6D8C;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.user-type-card:hover .user-type-arrow {
    transform: translateX(4px);
}

/* Back Button */
.cym-auth-modal .modal-header .btn-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: #666 !important;
}

.cym-auth-modal .modal-header .btn-link:hover {
    color: #d8a07b !important;
}

/* Form Controls */
.cym-auth-modal .form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.cym-auth-modal .form-control:focus {
    border-color: #d8a07b;
    box-shadow: 0 0 0 3px rgba(216, 160, 123, 0.1);
}

.cym-auth-modal .form-control-lg {
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
}

.cym-auth-modal .form-label {
    color: #333;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn-auth {
    color: #fff !important;
    background-color: #3A6D8C !important;
    border: 2px solid #3A6D8C !important;
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-auth:hover,
.btn-auth:focus {
    color: #fff !important;
    background-color: #4A8AAE !important;
    border-color: #4A8AAE !important;
    box-shadow: 0 4px 12px rgba(58, 109, 140, 0.4);
    transform: translateY(-1px);
}

.btn-auth:active {
    background-color: #2F5A72 !important;
    border-color: #2F5A72 !important;
    transform: translateY(0);
}

/* Google Sign In Container */
.cym-auth-modal .g_id_signin {
    width: 100%;
    max-width: 100%;
}

/* Divider with Text */
.cym-auth-modal hr {
    border-color: #e0e0e0;
}

.cym-auth-modal .position-relative span {
    font-size: 0.85rem;
}

/* Links */
.cym-auth-modal .btn-link:hover {
    text-decoration: underline !important;
}

/* Checkbox Styling */
.cym-auth-modal .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border: 2px solid #d0d0d0;
    border-radius: 4px;
    margin-top: 0.125rem;
}

.cym-auth-modal .form-check-input:checked {
    background-color: #d8a07b;
    border-color: #d8a07b;
}

.cym-auth-modal .form-check-label {
    font-size: 0.9rem;
    color: #555;
    padding-left: 0.5rem;
}

/* Error/Success Messages */
#clave_err,
#clave_success {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 576px) {
    #modalLogin .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .cym-auth-modal .modal-body {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    .cym-auth-modal .modal-header {
        padding: 1rem 1rem 0;
    }

    .cym-auth-modal h4 {
        font-size: 1.35rem;
    }

    .cym-auth-modal .modal-title + p {
        font-size: 0.8rem;
    }

    .cym-auth-modal .form-control-lg {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
    }

    .btn-outline-login {
        padding: 0.675rem 1.25rem;
        font-size: 0.95rem;
    }

    .cym-auth-modal img {
        max-width: 140px !important;
    }

    /* User Type Cards - Mobile */
    .user-type-options {
        gap: 0.75rem;
    }

    .user-type-card {
        padding: 1rem 0.875rem;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    .user-type-icon {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .user-type-icon svg {
        width: 28px;
        height: 28px;
    }

    .user-type-content {
        flex: 1;
        min-width: 0;
    }

    .user-type-content h5 {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .user-type-content p {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .user-type-arrow {
        font-size: 1.25rem;
        flex-shrink: 0;
    }
}

@media (max-width: 380px) {
    .cym-auth-modal .modal-body {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .cym-auth-modal h4 {
        font-size: 1.25rem;
    }

    .cym-auth-modal .modal-title + p {
        font-size: 0.75rem;
    }

    .cym-auth-modal img {
        max-width: 120px !important;
    }

    /* User Type Cards - Extra Small Mobile */
    .user-type-card {
        padding: 0.875rem 0.75rem;
        gap: 0.625rem;
    }

    .user-type-icon {
        width: 44px;
        height: 44px;
    }

    .user-type-icon svg {
        width: 26px;
        height: 26px;
    }

    .user-type-content h5 {
        font-size: 0.9rem;
    }

    .user-type-content p {
        font-size: 0.7rem;
        line-height: 1.2;
    }

    .user-type-arrow {
        font-size: 1.1rem;
    }
}

/* Tablet Optimization */
@media (min-width: 577px) and (max-width: 768px) {
    #modalLogin .modal-dialog {
        max-width: 480px;
    }

    .user-type-card {
        padding: 1.25rem 1.25rem;
    }

    .user-type-icon {
        width: 56px;
        height: 56px;
    }

    .user-type-icon svg {
        width: 40px;
        height: 40px;
    }
}

/* Mobile Landscape Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    #modalLogin .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }

    .cym-auth-modal .modal-body {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .cym-auth-modal img {
        max-width: 100px !important;
        margin-bottom: 0.5rem !important;
    }

    .cym-auth-modal h4 {
        font-size: 1.25rem;
        margin-bottom: 0.5rem !important;
    }

    .cym-auth-modal .modal-title + p {
        margin-bottom: 0.5rem !important;
    }

    .user-type-options {
        gap: 0.5rem;
    }

    .user-type-card {
        padding: 0.75rem 1rem;
    }

    .user-type-icon {
        width: 40px;
        height: 40px;
    }

    .user-type-icon svg {
        width: 24px;
        height: 24px;
    }

    .user-type-content h5 {
        font-size: 0.9rem;
    }

    .user-type-content p {
        font-size: 0.7rem;
    }
}

/* Desktop Optimization */
@media (min-width: 992px) {
    #modalLogin .modal-dialog {
        max-width: 520px;
    }

    .cym-auth-modal .modal-body {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* Animation for Form Transitions */
.cym-auth-modal {
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Input Focus State Enhancement */
.cym-auth-modal .form-control::placeholder {
    color: #aaa;
    font-size: 0.9rem;
}

/* Border Top Separator */
.cym-auth-modal .border-top {
    border-color: #e0e0e0 !important;
}

/* Modal Backdrop */
#modalLogin.show {
    background-color: rgba(0, 0, 0, 0.5);
}
