/* Ensure portal pages have white background */
/* Override any global background color rules for portal pages */
body.page-template-template-user-portal,
body.page-template-template-parents-portal,
body.page-template-template-enterprise-portal {
    background-color: #ffffff !important;
}

/* Cours section background colors */
/* Default white background */
.lescours-section {
    background-color: #ffffff;
}


/* Plan section - light grey background (#f5f5f5) */
.plan-section {
    background-color: #f5f5f5;
}

/* Ensure plan-section inner container also has the same background */
.plan-section .hero-container.grey {
    background-color: #f5f5f5;
}

.about-section {
    background-color: #ffffff;
}

/* Support section (FAQ) - white background on front page */
.support-section {
    background-color: #ffffff;
}

body.page-template-template-user-portal html,
body.page-template-template-parents-portal html,
body.page-template-template-enterprise-portal html {
    background-color: #ffffff !important;
}

.parents-portal-wrapper, .enterprise-portal-wrapper {
    padding: 10% 20px 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.parent-greetings {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

.profiles-container {
    margin-top: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profiles-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    margin-bottom: 60px;
}

.profile-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-card {
    width: 100px;
    height: 100px;
    background: #f5f5f5;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 0.5px solid #d0d0d0;
}

.profile-card.add-profile {
    border: 0.5px solid #d0d0d0;
    background: #fafafa;
}

.profile-card.add-profile:hover {
    background: #f0f0f0;
    border-color: #0dd3d3;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(13, 211, 211, 0.2);
}

.profile-card.existing-profile {
    padding: 0;
}

.profile-card.existing-profile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.plus-icon {
    font-size: 32px;
    color: #999;
    transition: all 0.3s ease;
}

.profile-card.add-profile:hover .plus-icon {
    color: #0dd3d3;
    transform: scale(1.1);
}

.profile-image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: #0dd3d3;
    background: linear-gradient(135deg, #e0f7f7 0%, #b8ecec 100%);
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
}

.profile-name.add-profile-text {
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

/* Edit Mode Styles */
.edit-profiles-btn {
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.edit-profiles-btn.visible {
    display: inline-block;
}

.edit-profiles-btn:hover {
    background: #ececec;
    transform: translateY(-2px);
}

.profile-card.edit-mode {
    pointer-events: all;
}

.profile-card.edit-mode .edit-icon-overlay {
    display: flex;
}

.edit-icon-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
}

.edit-icon-overlay .pencil-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-icon-overlay .pencil-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    height: 444px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.modal-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.upload-avatar-container {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.upload-avatar-container:hover {
    background: #e8e8e8;
}

.upload-avatar-container .pencil-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.upload-avatar-container .pencil-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.upload-avatar-container img:not(.pencil-icon img) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    position: absolute;
    top: 0;
    left: 0;
}

.upload-avatar-container input[type="file"] {
    display: none;
}

.form-field {
    flex: 1;
}

.form-field input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-field input:focus {
    outline: none;
    border-color: #0dd3d3;
}

.create-profile-btn {
    background: #0dd3d3;
    color: white;
    font-weight: 700;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.create-profile-btn:hover {
    background: #0bc1c1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 211, 211, 0.3);
}

.create-profile-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.save-profile-btn {
    flex: 1;
    background: #0dd3d3;
    color: white;
    font-weight: 700;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-profile-btn:hover {
    background: #0bc1c1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 211, 211, 0.3);
}

.delete-profile-btn {
    flex: 1;
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-profile-btn:hover {
    background: #ffe5e5;
    color: #c90000;
    border-color: #c90000;
}

.save-profile-btn:disabled,
.delete-profile-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Delete Confirmation Modal */
.delete-confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.delete-confirm-overlay.visible {
    display: flex;
}

.delete-confirm-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.delete-warning-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.delete-confirm-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #c90000;
}

.delete-confirm-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.delete-confirm-actions {
    display: flex;
    gap: 15px;
}

.confirm-delete-btn {
    flex: 1;
    background: #c90000;
    color: white;
    font-weight: 700;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-delete-btn:hover {
    background: #a00000;
}

.cancel-delete-btn {
    flex: 1;
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-delete-btn:hover {
    background: #e8e8e8;
}

.error-message {
    color: #c90000;
    font-size: 14px;
    margin-top: -10px;
}

.success-message {
    color: #27ae60;
    font-size: 14px;
    margin-top: -10px;
}

/* Suspended/Payment Failed Overlay Styles */
.suspended-overlay,
.payment-failed-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-failed-overlay {
    z-index: 99998;
}

.suspended-overlay-content,
.payment-failed-overlay-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    text-align: center;
}

.suspended-overlay-logo-container,
.payment-failed-overlay-logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.suspended-overlay-logo,
.payment-failed-overlay-logo {
    height: 50px;
}

.suspended-overlay-title,
.payment-failed-overlay-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
}

.suspended-overlay-message,
.payment-failed-overlay-message {
    margin: 0 0 30px 0;
    color: #7f8c8d;
    font-size: 16px;
    line-height: 1.6;
}

.suspended-overlay-button,
.payment-failed-overlay-button {
    display: inline-block;
    padding: 12px 30px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.suspended-overlay-button:hover,
.payment-failed-overlay-button:hover {
    text-decoration: none;
    color: white;
}

/* Plan-specific button colors */
.suspended-overlay-button.plan-empresa,
.payment-failed-overlay-button.plan-empresa {
    background: #5802c3;
}

.suspended-overlay-button.plan-estandar,
.payment-failed-overlay-button.plan-estandar {
    background: #0dd3d3;
}

.suspended-overlay-button.plan-ilimitado,
.payment-failed-overlay-button.plan-ilimitado {
    background: #eaa20f;
}

.enterprise-portal-wrapper.suspended {
    filter: blur(5px);
    pointer-events: none;
}

@media screen and (max-width: 991px) {
    .parents-portal-wrapper,
    .enterprise-portal-wrapper {
        padding: 12% 20px;
    }
    .user-session-wrapper {
        padding-top: 5%;
    }
    
    .parent-greetings,
    .admin-greetings {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    
    .profiles-grid {
        gap: 30px;
        max-width: 600px;
    }
    
    .profile-card {
        width: 100px;
        height: 100px;
    }
    
    .users-grid {
        gap: 30px;
        max-width: 700px;
    }
    
    .user-card {
        width: 100px;
        height: 100px;
    }
    
    .portal-actions {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .edit-profiles-btn,
    .upgrade-seats-btn {
        flex: 1;
        min-width: 200px;
    }
    
    /* User portal cards - 4 columns at 991px */
    .user-panels-wrap {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin: auto;
        justify-items: center;
    }
    
    /* Hide "du niveau" text in progression card at 991px and below */
    .left-panel-item.small.home.user-portal-card[href*="progression"] .control-text {
        font-size: 0;
        position: relative;
    }
    
    .left-panel-item.small.home.user-portal-card[href*="progression"] .control-text::before {
        content: "Progression";
        font-size: 14px;
        font-weight: 700;
        position: absolute;
        left: 0;
        top: 0;
        white-space: nowrap;
        color: #333;
    }
    
    /* DELF cards - 4 columns at 991px */
    .button-wrapper.delf-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        margin: auto;
        justify-items: center;
        width: 80%;
    }
    
    .delf-buttons-wrap {
        width: 100%;
        height: 200px;
        transform-origin: center;
        margin: 0;
    }
    
}

@media screen and (max-width: 767px) {
    .payment-method-success-message {
        font-size: 12px;
        padding: 10px 16px;
        max-width: 90%;
        white-space: normal;
        word-wrap: break-word;
        left: 50%;
        transform: translate(-50%, -50%);
    }
    
    .pay-now-section {
        margin-top: 15px;
        padding: 0 10px;
    }
    
    .pay-now-btn {
        font-size: 14px;
        padding: 10px;
    }
    .delf-buttons-wrap {
        width: 100%!important;
        height: 200px;
        transform: none !important;
        margin: 0;
    }
    
    /* Payment method modal content adjustments */
    #paymentMethodModal .plan-change-modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px;
    }
    
    #paymentMethodModal .plan-change-modal-body {
        padding: 20px 15px;
    }
    
    #existingPaymentMethods h3 {
        font-size: 14px;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    #paymentMethodsList {
        margin-bottom: 15px;
    }
    
    #addNewCardSection {
        margin-top: 15px;
        padding-top: 15px;
    }
    
    #addNewCardSection h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    #card-element {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    #card-errors {
        font-size: 12px;
        margin-bottom: 10px;
    }
    
    #addCardBtn,
    #payNowBtn {
        font-size: 14px;
        padding: 10px;
    }
    .payment-method-item {
        padding: 12px;
        font-size: 14px;
    }
    
    .payment-method-item strong {
        font-size: 14px;
    }
    
    .payment-method-item small {
        font-size: 12px;
    }
    .users-grid {
        gap: 50px;
    }
    
    /* Ensure max 5 items per row */
    .user-card-wrapper {
        width: calc((100% - 200px) / 5);
        max-width: 120px;
        min-width: 100px;
    }
    .parents-portal-wrapper,
    .enterprise-portal-wrapper {
        padding-top: 20% 15px;
    }
    .user-session-wrapper {
        padding-top: 10%;
    }
    
    .profiles-grid,
    .users-grid {
        gap: 20px;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
    }
    
    .profile-card-wrapper,
    .user-card-wrapper {
        width: 100%;
        max-width: 100px;
    }
    
    .profile-card,
    .user-card {
        width: 90px;
        height: 90px;
    }
    
    .profile-initial,
    .user-initial {
        font-size: 32px;
    }
    
    .profile-name {
        font-size: 14px;
        max-width: 90px;
    }
    
    .plus-icon {
        font-size: 28px;
    }
    
    .parent-greetings,
    .admin-greetings {
        font-size: 1.75rem;
        margin-bottom: 25px;
    }
    
    .modal-content {
        padding: 30px 20px;
        width: 95%;
        max-width: 450px;
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-content-pending {
        height: auto;
        max-height: 90vh;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .upload-avatar-container {
        align-self: center;
        width: 90px;
        height: 90px;
    }
    
    .form-field {
        width: 100%;
    }
    
    .form-field input,
    .form-field input[type="email"] {
        width: 100%;
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .create-profile-btn,
    .save-profile-btn,
    .delete-profile-btn,
    .send-invitation-btn,
    .cancel-btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .edit-profiles-btn {
        padding: 12px 30px;
        font-size: 16px;
        width: auto;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .upgrade-seats-btn {
        padding: 12px 30px;
        font-size: 16px;
        width: auto;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .portal-actions {
        width: 100%;
        padding: 0 15px;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        gap: 15px;
    }
    
    .portal-actions .edit-profiles-btn,
    .portal-actions .upgrade-seats-btn {
        margin: 0 auto;
    }
    
    .modal-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .modal-description {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .pending-info {
        padding: 15px;
    }
    
    .pending-info p {
        font-size: 14px;
    }
    
    .error-message {
        position: relative;
        bottom: auto;
        margin-top: 10px;
    }
    
    /* User portal cards - 2 columns at 767px */
    .user-panels-wrap {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin: auto;
        justify-items: center;
    }
    
    /* DELF cards - 2 columns (pairs) at 767px - normal size, no scaling */
    .button-wrapper.delf-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: 15px;
        margin: auto;
        justify-items: center;
        width: 90%;
    }
    .les-cours{
        width: 100%;
    }
    
    
    
   
}

@media screen and (max-width: 479px) {
    .delf-buttons-wrap {
        width: 140px;
        height: 140px;
        gap: 15px;
      }
    .parents-portal-wrapper,
    .enterprise-portal-wrapper {
        padding: 25% 10px;
    }
    .user-session-wrapper {
        padding-top: 20% !important;
    }
    
    .parent-greetings,
    .admin-greetings {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .profiles-grid,
    .users-grid {
        gap: 15px;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .profile-card-wrapper,
    .user-card-wrapper {
        width: 100%;
        max-width: 80px;
    }
    
    .profile-card,
    .user-card {
        width: 80px;
        height: 80px;
    }
    
    .profile-initial,
    .user-initial {
        font-size: 28px;
    }
    
    .profile-name {
        font-size: 12px;
        max-width: 80px;
    }
    
    .plus-icon {
        font-size: 24px;
    }
    
    .modal-content {
        padding: 25px 15px;
        width: 95%;
        border-radius: 15px;
    }
    
    .modal-title {
        font-size: 18px;
        margin-bottom: 15px;
        line-height: 1.3;
    }
    
    .modal-description {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .upload-avatar-container {
        width: 80px;
        height: 80px;
    }
    
    .form-field input,
    .form-field input[type="email"] {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .create-profile-btn,
    .save-profile-btn,
    .delete-profile-btn,
    .send-invitation-btn,
    .cancel-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .edit-profiles-btn {
        padding: 12px 30px;
        font-size: 16px;
        width: auto;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .upgrade-seats-btn {
        padding: 12px 30px;
        font-size: 16px;
        width: auto;
        max-width: none;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }
    
    .form-field label {
        font-size: 14px;
    }
    
    .form-info {
        font-size: 13px;
    }
    
    .pending-icon {
        width: 40%;
        height: 40%;
    }
    
    .pending-info {
        padding: 12px;
    }
    
    .pending-info p {
        font-size: 13px;
        margin: 8px 0;
    }
    
    .pending-message {
        font-size: 12px;
        margin-top: 15px !important;
        padding-top: 12px;
    }
    
    .delete-confirm-content {
        padding: 30px 20px;
        width: 95%;
    }
    
    .delete-confirm-title {
        font-size: 20px;
    }
    
    .delete-confirm-message {
        font-size: 14px;
    }
    
    .confirm-delete-btn,
    .cancel-delete-btn,
    .confirm-cancel-btn,
    .cancel-cancel-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .user-card-wrapper[data-tooltip]:hover::after {
        display: none;
    }
}

.admin-greetings {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #333;
    text-align: center;
}

.users-container {
    margin-top: 30px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.users-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
    margin-bottom: 60px;
    max-width: 900px;
}

.user-card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    position: relative;
}

/* Tooltip for full name/email on hover */
.user-card-wrapper[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

.user-card-wrapper[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(0, 0, 0, 0.9);
    z-index: 1001;
    pointer-events: none;
}


.user-card {
    width: 100px;
    height: 100px;
    background: #f5f5f5;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 0.5px solid #d0d0d0;
}

.user-card.add-user {
    border: 0.5px solid #d0d0d0;
    background: #fafafa;
}

.user-card.add-user:hover {
    background: #f0f0f0;
    border-color: #5802c3;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(88, 2, 195, 0.2);
}

.user-card.existing-user {
    padding: 0;
}

.user-card.existing-user:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.user-card.edit-mode {
    pointer-events: all;
}

.user-card.edit-mode .delete-icon-overlay {
    display: flex;
}

.delete-icon-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(201, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    z-index: 10;
    cursor: pointer;
    transition: background 0.3s ease;
}

.delete-icon-overlay:hover {
    background: rgba(160, 0, 0, 0.95);
}

.delete-icon-overlay .cross-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    font-weight: 300;
    line-height: 1;
}

.user-card.pending-user {
    background: #fafafa;
    border: 0.5px solid #d0d0d0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-card.pending-user:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(234, 162, 15, 0.25);
    border-color: #eaa20f;
    background: #fff9f0;
}

.pending-icon {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

.profile-name.pending-text {
    color: #999;
    font-size: 14px;
    font-weight: 400;
    margin-left: 0;
}

.plus-icon {
    font-size: 32px;
    color: #999;
    transition: all 0.3s ease;
}

.user-card.add-user:hover .plus-icon {
    color: #5802c3;
    transform: scale(1.1);
}

.user-image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.user-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: bold;
    color: #5802c3;
    background: linear-gradient(135deg, #ede5f7 0%, #d4bef0 100%);
}

.profile-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100px;
    position: relative;
    cursor: default;
}


.profile-name.add-profile-text {
    color: #999;
    font-size: 14px;
    font-weight: 400;
    margin-left: 0;
}

/* Edit Profiles Button */
.edit-profiles-btn {
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0px;
}

.edit-profiles-btn:hover {
    background: #ececec;
    transform: translateY(-2px);
}

.portal-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.upgrade-seats-btn {
    background: #5802c3;
    color: white;
    font-weight: 600;
    font-size: 16px;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.upgrade-seats-btn:hover {
    background: #4a02a5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 2, 195, 0.3);
    color: white;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.visible {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    text-align: left;
}

.modal-content-pending {
    height: 440px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333;
    line-height: 1.4;
}

.modal-description {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.invitation-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

#formMessage {
    position: absolute;
    bottom: 25px;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    z-index: 1;
    will-change: contents;
    transform: translateZ(0);
    backface-visibility: hidden;
}

#formMessage:empty {
    display: none;
}

#formMessage .error-message {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    color: #c90000;
    font-size: 14px;
    font-weight: 500;
    display: block;
    line-height: 1.4;
    opacity: 1;
    visibility: visible;
    transform: translateZ(0);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    margin-bottom: 20px;
}

.form-field label {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.form-field input[type="email"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-field input[type="email"]:focus {
    outline: none;
    border-color: #5802c3;
}

.form-info {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.pending-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.pending-info p {
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.6;
}

.pending-message {
    margin-top: 20px !important;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-style: italic;
}

.send-invitation-btn {
    background: #5802c3;
    opacity: 0.7;
    color: white;
    font-weight: 700;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: not-allowed;
    transition: all 0.3s ease;
    width: 100%;
}

.send-invitation-btn.enabled {
    opacity: 1;
    cursor: pointer;
}

.send-invitation-btn.enabled:hover {
    background: #4a0299;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 2, 195, 0.3);
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.cancel-btn:hover {
    background: #e8e8e8;
    opacity: 0.9;
}

/* Delete/Cancel Confirmation Modal */
.delete-confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.delete-confirm-overlay.visible {
    display: flex;
}

.delete-confirm-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.delete-warning-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.delete-confirm-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #c90000;
}

.delete-confirm-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.delete-confirm-actions {
    display: flex;
    gap: 15px;
}

.confirm-cancel-btn {
    flex: 1;
    background: #c90000;
    color: white;
    font-weight: 700;
    font-size: 16px;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirm-cancel-btn:hover {
    background: #a00000;
    transform: translateY(-2px);
}

.cancel-cancel-btn {
    flex: 1;
    background: #f5f5f5;
    color: #666;
    font-weight: 600;
    font-size: 16px;
    padding: 15px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-cancel-btn:hover {
    background: #e8e8e8;
}

.error-message {
    position: absolute;
    bottom: 180px;
    width: 100%;
    color: #c90000;
    font-size: 14px;
    text-align: left;
    background: transparent;
    border: none;
    margin: 0;
    padding: 0;
    font-weight: 500;
}

.success-message {
    color: #27ae60;
    font-size: 14px;
    margin-top: -10px;
}

/* Suspended/Payment Failed Overlay Styles */
.suspended-overlay,
.payment-failed-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-failed-overlay {
    z-index: 99998;
}

.suspended-overlay-content,
.payment-failed-overlay-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    text-align: center;
}

.suspended-overlay-logo-container,
.payment-failed-overlay-logo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.suspended-overlay-logo,
.payment-failed-overlay-logo {
    height: 50px;
}

.suspended-overlay-title,
.payment-failed-overlay-title {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 24px;
}

.suspended-overlay-message,
.payment-failed-overlay-message {
    margin: 0 0 30px 0;
    color: #7f8c8d;
    font-size: 16px;
    line-height: 1.6;
}

.suspended-overlay-button,
.payment-failed-overlay-button {
    display: inline-block;
    padding: 12px 30px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.suspended-overlay-button:hover,
.payment-failed-overlay-button:hover {
    text-decoration: none;
    color: white;
}

/* Plan-specific button colors */
.suspended-overlay-button.plan-empresa,
.payment-failed-overlay-button.plan-empresa {
    background: #5802c3;
}

.suspended-overlay-button.plan-estandar,
.payment-failed-overlay-button.plan-estandar {
    background: #0dd3d3;
}

.suspended-overlay-button.plan-ilimitado,
.payment-failed-overlay-button.plan-ilimitado {
    background: #eaa20f;
}

.enterprise-portal-wrapper.suspended {
    filter: blur(5px);
    pointer-events: none;
}

/* Payment Method Modal Styles */
.payment-method-success-message {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #27ae60;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 10020;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: 14px;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.payment-method-success-message.show {
    display: block !important;
    opacity: 1 !important;
}

.pay-now-section {
    display: none;
    margin-top: 15px;
}

.pay-now-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    background-color: #27ae60 !important;
    color: white !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pay-now-btn:hover {
    background-color: #229954 !important;
}

.pay-now-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #27ae60 !important;
}

.payment-method-success-message.processing {
    background: #f39c12;
}

.payment-method-success-message.success {
    background: #27ae60;
}

.payment-method-success-message.error {
    background: #e74c3c;
}


@media (max-width: 479px) {
    .payment-method-success-message {
        font-size: 11px;
        padding: 8px 12px;
        max-width: 85%;
    }
    
    .pay-now-section {
        margin-top: 10px;
        padding: 0 5px;
    }
    
    .pay-now-btn {
        font-size: 13px;
        padding: 10px 8px;
    }
    
    #paymentMethodModal .plan-change-modal-content {
        width: 98%;
        max-width: 98%;
        margin: 5px;
        border-radius: 8px;
    }
    
    #paymentMethodModal .plan-change-modal-title {
        font-size: 18px;
        padding: 20px 15px 15px;
    }
    
    #paymentMethodModal .plan-change-modal-body {
        padding: 15px 10px;
    }
    
    #existingPaymentMethods h3 {
        font-size: 13px;
    }
    
    #addNewCardSection h3 {
        font-size: 13px;
    }
    
    #addCardBtn,
    #payNowBtn {
        font-size: 13px;
        padding: 10px;
    }
}

/* Payment Method Modal Content Max Width */
#paymentMethodModal .plan-change-modal-content {
    max-width: 600px;
}

#deletePaymentMethodModal .plan-change-modal-content {
    max-width: 400px;
}

/* Payment Method Modal Elements */
#paymentMethodsLoading,
#paymentMethodsError {
    text-align: center;
    padding: 20px;
}

#paymentMethodsError {
    color: red;
    display: none;
}

#existingPaymentMethods {
    display: none;
}

#existingPaymentMethods h3 {
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 16px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

#editPaymentMethodsIcon {
    cursor: pointer;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.2s;
}

#editPaymentMethodsIconImg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0);
}

#paymentMethodsList {
    margin-bottom: 20px;
}

#addNewCardSection {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

#addNewCardSection h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: #2c3e50;
}

#card-element {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

#card-errors {
    color: #e67e22;
    font-size: 14px;
    margin-bottom: 15px;
}

#deletePaymentMethodModal {
    display: none;
    z-index: 10030;
}

#deletePaymentMethodModal .plan-change-modal-body {
    grid-template-columns: 1fr;
    padding: 20px;
}

#deletePaymentMethodModal p {
    text-align: center;
    margin-bottom: 20px;
}

#deletePaymentMethodModal .modal-button-container {
    justify-content: center;
}

#deletePaymentMethodModal .btn-confirm {
    background: #e74c3c;
    border-color: #e74c3c;
}



@media (max-width: 479px) {
    .payment-method-item {
        padding: 10px;
        font-size: 13px;
    }
    
    .payment-method-item strong {
        font-size: 13px;
    }
    
    .payment-method-item small {
        font-size: 11px;
    }
    
    #editPaymentMethodsIcon {
        width: 16px;
        height: 16px;
    }
}

/* Button width classes */
#addCardBtn,
#payNowBtn {
    width: 100%;
}

/* Ensure modal body is single column */
#paymentMethodModal .plan-change-modal-body.no-gap {
    grid-template-columns: 1fr;
}

/* ============================================
   User Portal Specific Styles
   ============================================ */

/* Memory button hover effect with level color */
.memory-button:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
    color: var(--level-color) !important;
}

.memory-button:active {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15) !important;
}

/* Reward Card Styles */
.reward-card {
    position: relative;
    overflow: hidden;
}

.exercise-but.no-thumbnail {
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin-left: 0;
    margin-top: 10px;
    margin-bottom: 10px;
}

.exercise-but {
    width: 200px;
    box-sizing: border-box;
}

.reward-card .reward-sticker-display {
    height: auto;
    margin: 20px auto;
    display: block;
    filter: brightness(1);
    transition: filter 0.3s ease;
}

@keyframes rewardPulse {
    0% {
        filter: brightness(1);
    }
    40% {
        filter: brightness(0.95);
    }
    70% {
        filter: brightness(0.9);
    }
    100% {
        filter: brightness(1);
    }
}

.reward-card:hover .reward-sticker-display {
    animation: rewardPulse 0.2s ease-in-out;
}

.reward-card:not(:hover) .reward-sticker-display {
    animation: none;
}

/* Reward Placeholder - Simple Lock */
.reward-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    min-height: 150px;
    position: relative;
    margin: auto;
}

.reward-card .reward-badge-placeholder {
    width: 80px !important;
    height: auto;
    filter: grayscale(100%) brightness(1.08);
    opacity: 1;
}

@keyframes rewardPulseHover {
    0% {
        filter: grayscale(100%) brightness(1.08);
    }
    50% {
        filter: grayscale(100%) brightness(1.4);
    }
    100% {
        filter: grayscale(100%) brightness(1.08);
    }
}

.reward-card:hover .reward-badge-placeholder {
    animation: rewardPulseHover 0.2s ease;
}

/* ============================================
   Payment Modal - Blur Prevention Styles
   (For suspended accounts in user portal)
   ============================================ */

/* Prevent blur from affecting payment modal - ensure it's above suspended overlay and not affected by parent filters */
#paymentMethodModal.plan-change-modal {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000001 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate !important;
    filter: none !important;
    will-change: transform;
    transform: translateZ(0);
}

#paymentMethodModal .plan-change-modal-content {
    position: relative ;
    background: white;
    border-radius: 12px;
    max-width: 600px !important;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 1000002 !important;
    isolation: isolate !important;
    filter: none !important;
    will-change: transform;
    transform: translateZ(0);
}
