/* Fideltour Login Module Styles - Mexico Grand Hotels Theme */

:root {
    --fideltour-gold: #c9a227;
    --fideltour-gold-dark: #b08d1f;
    --fideltour-text: #333333;
    --fideltour-text-light: #666666;
    --fideltour-border: #e0e0e0;
    --fideltour-bg: #ffffff;
    --fideltour-required: #c9a227;
}

.mod-fideltour-login {
    max-width: 520px;
    width: 520px;
    margin: 0 auto;
    padding: 25px 30px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--fideltour-bg);
}

/* Hero Section Overlay Positioning */
.mod-fideltour-login.hero-overlay {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    max-width: 520px;
    width: 520px;
    background: var(--fideltour-bg);
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
}

/* Auth container - no extra background */
.fideltour-auth-container {
    background: transparent;
}

/* Header with Logo */
.fideltour-header {
    text-align: center;
    margin-bottom: 15px;
}

.fideltour-crown {
    width: 35px;
    height: 22px;
    margin: 0 auto 8px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M50 5 L60 25 L75 10 L70 35 L85 20 L75 45 L90 35 L70 55 L30 55 L10 35 L25 45 L15 20 L30 35 L25 10 L40 25 Z' fill='%23c9a227'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.fideltour-title {
    font-size: 22px;
    font-weight: 400;
    color: var(--fideltour-text);
    margin: 0;
    line-height: 1.3;
}

.fideltour-title .gold {
    color: var(--fideltour-gold);
}

.form-subtitle {
    text-align: center;
    color: var(--fideltour-text-light);
    font-size: 13px;
    margin: 0 0 18px 0;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Forms */
.fideltour-form {
    padding: 0;
}

/* Form Row - Two columns */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

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

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 400;
    color: var(--fideltour-text);
    font-size: 12px;
}

.form-group label .required {
    color: var(--fideltour-required);
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--fideltour-border);
    border-radius: 0;
    font-size: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    line-height: 1.4;
    color: var(--fideltour-text);
    background: var(--fideltour-bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--fideltour-gold);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Select styling */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

/* Checkbox styling */
.checkbox-group {
    margin-bottom: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: var(--fideltour-text);
    font-weight: 400;
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    accent-color: var(--fideltour-gold);
    cursor: pointer;
}

.checkbox-label span {
    line-height: 1.4;
}

/* Buttons */
.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: var(--fideltour-gold);
    color: white;
}

.btn-primary:hover {
    background: var(--fideltour-gold-dark);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-loader {
    display: inline-block;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Form Footer */
.form-footer {
    margin-top: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.form-footer a {
    color: var(--fideltour-gold);
    text-decoration: none;
    font-size: 12px;
}

.form-footer a:hover {
    text-decoration: underline;
    color: var(--fideltour-gold-dark);
}

.form-footer .separator {
    color: var(--fideltour-text-light);
    font-size: 12px;
}

.register-footer {
    justify-content: flex-start;
}

.register-footer .btn {
    min-width: 100px;
}

/* Messages */
.fideltour-message {
    padding: 10px 12px;
    border-radius: 0;
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.4;
}

.fideltour-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.fideltour-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.fideltour-message.info {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Logged In User Panel */
.fideltour-user-panel {
    text-align: center;
    padding: 15px;
    background: transparent;
}

.fideltour-logo {
    margin-bottom: 12px;
}

.fideltour-logo img {
    max-width: 120px;
    height: auto;
}

.user-welcome h3 {
    margin: 0 0 8px 0;
    color: var(--fideltour-text);
    font-size: 20px;
    font-weight: 400;
}

.user-email {
    color: var(--fideltour-text-light);
    font-size: 13px;
    margin-bottom: 20px;
}

.user-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.user-actions button,
.user-actions .btn {
    min-width: 130px;
}

.fideltour-logout-form {
    display: inline-block;
}

/* Modal Overlay */
.fideltour-modal {
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fideltour-modal-overlay {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.fideltour-modal-container {
    position: relative;
    z-index: 1;
    background-color: var(--fideltour-bg);
    padding: 30px;
    border-radius: 0;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.fideltour-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.fideltour-modal-close:hover {
    color: var(--fideltour-text);
}

/* Legacy modal (for info modal) */
.modal-content {
    background-color: var(--fideltour-bg);
    padding: 30px;
    border-radius: 0;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

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

.close-modal {
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 24px;
    font-weight: 300;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: var(--fideltour-text);
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--fideltour-text);
    font-weight: 400;
    font-size: 18px;
}

#fideltour-info-content p {
    margin: 12px 0;
    font-size: 13px;
    color: var(--fideltour-text-light);
}

#fideltour-info-content strong {
    color: var(--fideltour-text);
    font-weight: 500;
}

.loyalty-status {
    margin-top: 20px !important;
    padding: 12px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 0;
    text-align: center;
    font-weight: 500;
}

/* Form Description */
.form-description {
    color: var(--fideltour-text-light);
    margin-bottom: 15px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .mod-fideltour-login.hero-overlay {
        right: 30px;
        max-width: 480px;
        width: 480px;
    }
}

@media (max-width: 768px) {
    .mod-fideltour-login.hero-overlay {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 20px auto;
        max-width: 100%;
        width: 95%;
        padding: 20px 15px;
    }

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

    .fideltour-title {
        font-size: 20px;
    }

    .user-actions {
        flex-direction: column;
    }

    .user-actions button,
    .user-actions .btn {
        width: 100%;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

    .register-footer {
        flex-direction: column;
        gap: 12px;
    }

    .register-footer .btn {
        width: 100%;
    }
}

/* Hide tabs - using links instead */
.fideltour-tabs {
    display: none;
}

/* Hide ALL module visible output - only modal and header JS should show */
.mod-fideltour-login.hero-overlay,
#fideltour-header-buttons,
.fideltour-username-display {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* User info details in modal */
.user-info-details {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    text-align: left;
}

.user-info-details p {
    margin: 8px 0;
    font-size: 13px;
    color: var(--fideltour-text-light);
}

.user-info-details strong {
    color: var(--fideltour-text);
}

/* Header username styling */
.fideltour-username {
    font-weight: 500;
}

/* Modal auth container - remove hero positioning when inside modal */
.fideltour-modal .fideltour-auth-container {
    position: static;
    transform: none;
    box-shadow: none;
    max-width: none;
    width: auto;
    padding: 0;
}

.fideltour-modal .mod-fideltour-login {
    position: static;
    transform: none;
    box-shadow: none;
    max-width: none;
    width: auto;
    padding: 0;
}

/* Country Picker Styles */
.country-picker-wrapper {
    position: relative;
    width: 100%;
}

.country-search {
    width: 100%;
    cursor: pointer;
}

.country-search.open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--fideltour-border);
    border-top: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.country-item {
    padding: 8px 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--fideltour-text);
    transition: background-color 0.15s ease;
}

.country-item:hover {
    background-color: #f5f5f5;
}

.country-item:active {
    background-color: var(--fideltour-gold);
    color: white;
}
