/* ========== PROFILE POPUP STYLES ========== */

/* Popup content wrapper with footer */
.popup-content-with-footer {
    /*display: flex;*/
    flex-direction: column;
    height: 500px;
    padding: 0;
    overflow: hidden;
}


/* Profile Tabs Navigation */
.profile-tabs {
    display: flex;
    gap: 0;
    border: 1px;
    margin-bottom: 0;
    flex-shrink: 0;
    padding: 0px 0px;
}

.profile-tab {
    flex: 1;
    padding: 10px 0px;
    background-color: #555555;/* #ffffff00;var(--profile-tab-active-bg);*/
    color: var(--text-primary);
    /*border: var(--border-size-thick-popups) solid #39225e;*/
    height: 50px;
    border: 3px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.profile-tab:hover {
    background-color: #252525;/*var(--bg-popup-gradient-end);*/
}

.profile-tab.active {
    color: var(--text-primary);
    background-color: var(--tab-selected);
}

/* Scrollable Content Area */
.profile-content-scrollable {
    /*flex: 1;*/
    height: 390px;
    overflow-y: auto;
    padding-top: 20px;
    padding-bottom: 0px;
    padding-left: 5px;
    padding-right: 5px;
}

/* Scrollable Content Area for Chat History*/
.profile-content-scrollable-chat-history {
    /*flex: 1;*/
    height: 420px;
    overflow-y: auto;
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    padding-right: 0px;
}


/* Tab Content */
.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Profile Section */
.profile-section {
    padding: 10px 20px 0px 20px;
}

.profile-section h3 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-input);
}

/* Profile Fields */
.profile-field {
    margin-bottom: 20px;
}

/* Profile Fields Grid (2-column layout) */
.profile-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.profile-fields-grid .profile-field {
    margin-bottom: 0;
}

.profile-field label {
    display: block;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.profile-field input[type="text"],
.profile-field input[type="email"],
.profile-field select {
    width: 100%;
    padding: 10px 12px;
    background-color: var(--bg-input-dark);
    color: var(--text-primary);
    border: 1px solid var(--border-input);
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
}

.profile-field input[type="text"]:focus,
.profile-field input[type="email"]:focus,
.profile-field select:focus {
    border-color: #00a108;
    outline: none;
}

.profile-field input[readonly] {
    background-color: #0c001a;
    color: #adadad;
    cursor: not-allowed;
}

/* Checkbox styling */
.profile-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

.profile-field label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Profile Buttons */
.profile-btn {
    padding: 10px 20px;
    background-color: #008f07;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn:hover {
    background-color: #196b00;
}

.profile-btn-upgrade {
    align-self: center;
    width: 300px;
    padding: 14px 20px;
    /*background: linear-gradient(135deg, #1ba100 0%, #00d911 100%);*/
    background: #008f07;
    color: #1b1b1b;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    /*transition: all 0.3s ease;*/
    margin-bottom: 10px;
}

.profile-btn-upgrade:hover {
    transform: scale(1.02);
    background: #196b00;
}

.profile-btn-danger {
    padding: 10px 20px;
    background-color: #8b0000;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn-danger:hover {
    background-color: #b71c1c;
}

/* Profile Status Card */
.profile-status-card {
    background: linear-gradient(135deg, rgba(0, 161, 8, 0.1) 0%, rgba(0, 161, 8, 0.05) 100%);
    border: 1px solid #00a108;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.profile-status-plan {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.profile-plan-badge {
    display: inline-block;
    padding: 6px 12px;
    background-color: #00a108;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
}

.profile-plan-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.profile-status-valid {
    color: #cccccc;
    font-size: 13px;
    margin-bottom: 15px;
}

.profile-status-valid span:last-child {
    color: #ffffff;
    font-weight: 500;
}

/* Usage Bar */
.profile-usage {
    margin-top: 15px;
}

.profile-usage > span:first-child {
    display: block;
    color: #cccccc;
    font-size: 13px;
    margin-bottom: 8px;
}

.profile-usage-bar {
    width: 100%;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.profile-usage-fill {
    height: 100%;
    background: linear-gradient(90deg, #00a108 0%, #00d911 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}

.profile-usage-text {
    display: block;
    color: #ffffff;
    font-size: 12px;
}

/* Danger Zone */
.profile-danger-zone {
    padding-top: 40px;
    padding-bottom: 0px;
    padding-left: 20px;
    padding-right: 20px;
    background-color: rgba(139, 0, 0, 0.1);
    border: 1px solid #8b0000;
    border-radius: 8px;
}

.profile-danger-zone h3 {
    color: #ff5555;
}

/* Frame for Menue with Tabs */
.profile-frame {
    padding-top: 10px;
    padding-bottom: 0px;
    padding-left: 5px;
    padding-right: 5px;
    height: 350px;
    width: calc(100% - 15px);
    border: 1px solid var(--border-tertiary);
    border-radius: 8px;
}

/* Frame for Menue with no Tabs */
.profile-frame-no-tabs {
    padding-top: 10px;
    padding-bottom: 0px;
    padding-left: 5px;
    padding-right: 5px;
    height: 400px;
    width: calc(100% - 25px);
    border: 1px solid var(--border-tertiary);
    border-radius: 8px;
}

/* Profile Hints */
.profile-hint {
    margin-top: 8px;
    color: #888888;
    font-size: 11px;
    line-height: 1.4;
}

.profile-hint-danger {
    color: #ff5555;
    font-weight: 500;
}

/* ========== PROFILE FOOTER (Fixed Buttons) ========== */

.profile-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 0px 0px;
    background-color: rgba(251, 251, 251, 0);
    border-top: 0px solid #8c8c8c;
    flex-shrink: 0;
}

.profile-footer-btn  {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-footer-btn-cancel {
    background-color: #444444;
    color: #ffffff;
}

.profile-footer-btn-cancel:hover {
    background-color: #555555;
}

.profile-footer-btn-apply {
    background-color: #00a108;
    color: #ffffff;
}

.profile-footer-btn-apply:hover {
    background-color: #00d911;
}



/* ========== TOGGLE SWITCH STYLES ========== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--toggle-bg);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--toggle-bg-active);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 1px #0a7c0a;
}
