
/*========================================================
    BASE LAYOUT
=========================================================*/

.orga-profile-view,
.orga-profile-edit {
    max-width: var(--content-max-width);
    margin: 0;
    min-width: 100%;
    padding: 20px;
    padding-top: 0;
}

/*========================================================
    POPUP OVERLAY & GLASS-MORPHISM
=========================================================*/

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--pale-mint), var(--color-accent-orange-opacity-25)) !important;
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 900;
    transition: opacity var(--transition-slow);
}

.popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.popup-box {
    background: var(--white-glass-strong);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    width: 95%;
    max-width: var(--content-max-width);
    max-height: var(--popup-max-height);
    display: flex;
    flex-direction: column;
    box-sizing:border-box;
    align-self: start;
    margin-top: var(--popup-margin-top);
}
.popup-content {
    flex: 1;
    overflow-y: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.pf-popup-header {
    padding: 18px 24px;
    padding-bottom: 10px;
    background: none;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.pf-popup-header h2 {
    color: var(--purple);
    margin: 0;
    font-size: 28px;
}

/*========================================================
    PROFILE HEADER
=========================================================*/

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 10px;
    padding: 10px;
    background: linear-gradient(135deg, var(--pale-mint), var(--pale-purple));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    color: var(--purple);
}

.profile-header-top {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.profile-header-info .orga-user-group-icons .fa-solid {
    color: var(--color-primary-opacity-48)!important;
}

.profile-header-info {
    flex: 1;
    min-width: 0;
    display: inline-grid;
    grid-template-columns: 1fr auto;
    align-self: center;
    gap: 10px;
    padding-right: 10px; 
}

.profile-header-info .button,
.profile-header .button {
    width: fit-content;
    border-radius: 24px;
    background-color: rgba(255, 255, 255, 0.35) !important;
    color: var(--purple) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease, color 0.2s ease; 
    font-weight: normal !important; 
}

.profile-header-info .button:hover,
.profile-header .button:hover {
    background-color: var(--apricot) !important;
}

.profile-header h2 {
    margin: 0 0 15px 0;
    font-size: 24px;
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 10px;
}

/*========================================================
    PROFILE IMAGE/AVATAR
=========================================================*/

.profile-image-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 100%;
    overflow: hidden;
    background: var(--white-glass);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.profile-image-wrapper.editable {
    cursor: pointer;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.profile-image-wrapper.editable:hover .profile-image {
    opacity: 0.7;
}

.profile-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.profile-image-wrapper.editable:hover .profile-image-overlay {
    opacity: 1;
}

.profile-image-edit-hint {
    color: white;
    font-size: var(--font-size-base);
    font-weight: 600;
}

/*========================================================
    TABS & NAVIGATION
=========================================================*/

.profile-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, var(--pale-mint), var(--pale-purple));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    flex-shrink: 0 !important;
}

.profile-tab-button {
    background-color: #E8F9F4 !important;
    border-radius: 12px !important;
    padding: 10px 16px !important;
    color: var(--purple) !important;
    border: none !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.profile-tab-button.active {
    background: var(--light-purple) !important;
    color: var(--purple) !important;
}

.profile-tab-button:hover {
    background-color: var(--apricot) !important;
    color: #3A3A3A !important;
}

.profile-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
    background: linear-gradient(135deg, var(--pale-mint), var(--pale-purple));
    overflow-y: auto;
    max-height: calc(80vh - 280px);
    min-height: 0;
    padding: 20px;
    flex: 1;
    color: var(--purple);
}

#tab-groups .orga-user-groups a {
    color: var(--purple) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

#tab-groups .orga-user-groups a:hover {
    color: var(--apricot) !important;
}

#tab-groups .orga-user-groups {
    padding: 20px;
}

.profile-tab-content::-webkit-scrollbar,
.profile-fields-grid::-webkit-scrollbar {
    width: 12px;
}

.profile-tab-content::-webkit-scrollbar-track,
.profile-fields-grid::-webkit-scrollbar-track {
    background: var(--color-primary-soft);
    border-radius: 12px;
}

.profile-tab-content::-webkit-scrollbar-thumb,
.profile-fields-grid::-webkit-scrollbar-thumb {
    background: var(--color-primary-medium);
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px) saturate(160%);
}

.profile-tab-content::-webkit-scrollbar-thumb:hover,
.profile-fields-grid::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-strong);
}


.profile-tab-content.active {
    display: block;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*========================================================
    MOBILE NAVIGATION
=========================================================*/

.pg-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
}

.pg-nav-btn span {
    width: 4px;
    height: 4px;
    background: var(--purple);
    border-radius: 50%;
    display: block;
}

.pg-nav-dropdown {
    position: absolute;
    right: 10px;
    top: 40px;
    background: var(--white-glass-strong);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    display: none;
    min-width: 160px;
    z-index: 9999;
}

.pg-nav-dropdown.open {
    display: block;
}

.pg-nav-dropdown li {
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.pg-nav-dropdown li a {
    display: block;
    white-space: nowrap;
    text-decoration: none !important;
    background: var(--light-purple);
    padding: 10px;
    margin: 6px 8px;
    border-radius: 12px;
    color: var(--purple);
    font-size: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: background 0.15s ease, box-shadow 0.15s ease;
}

.pg-nav-dropdown li a:hover {
    background: var(--color-accent-orange-opacity-35);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
}

.pg-nav-dropdown li * {
    margin-left: 0 !important;
}

/*========================================================
    FORM CONTENT & LAYOUT
=========================================================*/

.profile-form-content {
    background: transparent;    
    border-radius: 12px;
    overflow: hidden;
}

.profile-content {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
}

.profile-display-grid,
.profile-fields-grid {
    display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
    padding: 10px;
}

/*========================================================
    FIELD DISPLAY (Profile View)
=========================================================*/

.profile-field-display {
    padding: 10px;
    background: var(--white-glass) !important;
    border-radius: 12px;
    border: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

.profile-field-display .field-label {
    font-weight: 600;
    font-size: var(--font-size-small);
    text-transform: uppercase;
    color: var(--purple);
    margin: 0;
    display: block;
    letter-spacing: 0.5px;
    width: 210px;
    flex-shrink: 0;
    word-break: keep-all;
    overflow-wrap: normal;
    white-space: normal;
}

.profile-field-display .field-value {
    font-size: var(--font-size-base);
    color: var(--purple);
    line-height: 1.6;
    word-break: break-word;
    flex: 1;
}

.profile-field-display .field-value a {
    color: var(--mint) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.profile-field-display .field-value a:hover {
    color: var(--apricot) !important;
    text-decoration: underline;
}

/*========================================================
    FIELD EDIT (Profile Edit Form)
=========================================================*/

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-field .field-label {
    font-weight: 600;
    font-size: var(--font-size-base);
    color: var(--purple);
    display: flex;
    align-items: center;
    gap: 5px;
}

.required-indicator {
    color: #dc3545;
    font-weight: bold;
}

.profile-field .field-description {
    font-size: var(--font-size-small);
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.field-control {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Account Settings Specific */
#tab-account .profile-field-wrapper {
    margin-bottom: 15px;
}

#tab-account .profile-field {
    background: var(--white-glass);
    padding: 16px;
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/*========================================================
    FORM INPUTS
=========================================================*/

.profile-field input[type="text"],
.profile-field input[type="email"],
.profile-field input[type="url"],
.profile-field input[type="number"],
.profile-field input[type="password"],
.profile-field input[type="color"],
.profile-field textarea,
.profile-field select {
    padding: 10px 12px;
    border: none;
    border-radius: 12px;
    font-size: var(--font-size-base);
    font-family: inherit;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) inset;
    color: var(--purple);
}

.profile-field input[type="text"]:focus,
.profile-field input[type="email"]:focus,
.profile-field input[type="url"]:focus,
.profile-field input[type="number"]:focus,
.profile-field input[type="password"]:focus,
.profile-field input[type="color"]:focus,
.profile-field textarea:focus,
.profile-field select:focus {
    outline: none;
    border-color: var(--apricot);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 153, 102, 0.2), 0 2px 6px rgba(0, 0, 0, 0.08) inset;
}

.profile-field textarea {
    resize: vertical;
    min-height: 100px;
}

/*========================================================
    RADIO & CHECKBOX GROUPS
=========================================================*/

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: var(--font-size-base);
    color: var(--purple);
}

.radio-option input[type="radio"] {
    cursor: pointer;
    margin: 0;
    accent-color: var(--apricot);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: var(--font-size-base);
    color: #666;
}

.checkbox-option input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    accent-color: var(--light-purple);
}

/*========================================================
    TOGGLE & COLOR INPUTS
=========================================================*/

.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    width: fit-content;
}

.toggle-wrapper input[type="checkbox"] {
    appearance: none;
    width: 40px;
    height: 24px;
    background: #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0;
}

.toggle-wrapper input[type="checkbox"]:checked {
    background: var(--mint);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: left 0.3s;
    pointer-events: none;
}

.toggle-wrapper input[type="checkbox"]:checked + .toggle-slider {
    left: 18px;
}

.wysiwyg-field {
    border: 1px solid #ddd !important;
    padding: 10px 12px !important;
    min-height: 300px !important;
}

/*========================================================
    GROUPS DISPLAY
=========================================================*/

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.group-tile {
    background: linear-gradient(135deg, var(--color-primary-opacity-18), rgba(201, 183, 231, 0.18)) !important;
    border-radius: 16px !important;
    padding: 12px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    text-align: center;
    transition: all 0.3s ease;
}

.group-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

.group-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.group-title {
    margin: 10px 0;
    font-size: var(--font-size-small);
    font-weight: 600;
    color: var(--purple) !important;
}

.group-description {
    color: var(--purple) !important;
    font-size: 0.95rem !important;
    background: var(--white-glass) !important;
    padding: 12px !important;
    border-radius: 12px !important;
}

/*========================================================
    AVATAR SELECTION MODAL
=========================================================*/

.avatar-selection-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(135deg, var(--pale-mint), var(--color-accent-orange-opacity-25)) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.avatar-selection-modal.active {
    display: flex;
}

.avatar-selection-content {
    background: var(--white-glass-strong);
    backdrop-filter: blur(18px) saturate(160%);
    border-radius: 16px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: var(--purple);
}

.avatar-selection-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: var(--font-size-xl);
    color: var(--purple);
}

.avatar-selection-content p {
    margin: 10px 0 !important;
}

.avatars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.avatar-option {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--light-purple);
    transition: all 0.2s ease;
    background: var(--white-glass);
}

.avatar-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 1;
}

.avatar-option:hover {
    border-color: var(--mint);
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--color-primary-opacity-30);
}

.avatar-option.selected {
    border-color: var(--apricot);
    box-shadow: 0 0 15px rgba(255, 153, 102, 0.5);
    background: rgba(255, 153, 102, 0.15);
}

.avatar-divider {
    border: none;
    border-top: 1px solid var(--light-purple);
    margin: 10px 0 !important;
}

.avatar-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.avatar-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 600;
    transition: all 0.2s ease;
}

.avatar-actions .btn-primary {
    background: var(--pale-mint) !important;
    color: var(--purple);
}

.avatar-actions .btn-primary:hover {
    background: var(--apricot) !important;
    transform: translateY(-1px);
}

.avatar-actions .btn-secondary {
    background: var(--light-purple) !important;
    color: var(--purple);
}

.avatar-actions .btn-secondary:hover {
    background: var(--color-accent-orange-opacity-35) !important;
    transform: translateY(-1px);
}

#uploadCustomBtn {
    border-radius: 12px !important;
    background: var(--white-glass-strong) !important;
}

/*========================================================
    TOAST NOTIFICATIONS
=========================================================*/

.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 400px;
}

.toast {
    background: white;
    border-left: 4px solid var(--mint);
    padding: 16px 20px;
    margin-bottom: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease forwards;
    min-width: 300px;
}

.toast.success {
    border-left-color: #28a745;
}

.toast.success .toast-icon {
    color: #28a745;
}

.toast.error {
    border-left-color: #dc3545;
}

.toast.error .toast-icon {
    color: #dc3545;
}

.toast.info {
    border-left-color: #17a2b8;
}

.toast.info .toast-icon {
    color: #17a2b8;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: var(--font-size-xxl);
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    color: #333;
    font-size: var(--font-size-base);
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: var(--font-size-xxl);
    padding: 0;
    flex-shrink: 0;
}

.toast-close:hover {
    color: #333;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.toast.removing {
    animation: slideOut 0.3s ease forwards;
}

/*========================================================
    FORM ACTIONS
=========================================================*/

.form-actions {
    padding-top: 10px;
    border-top: none;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.form-actions .button {
    padding: 10px 30px;
    font-size: var(--font-size-base);
    border-radius: 12px !important;
    border: none !important;
    background: var(--pale-mint) !important;
    color: var(--purple) !important;
    font-weight: 600 !important;
    transition: all 0.2s ease;
}

.form-actions .button:hover {
    background: var(--color-accent-orange-opacity-35) !important;
    transform: translateY(-1px);
}

.form-actions .button-primary {
    background-color: var(--pale-mint) !important;
    border-color: none;
    color: var(--purple) !important;
    width: fit-content;
}

.form-actions .button-primary:hover {
    background-color: var(--apricot) !important;
    border-color: none;
    transform: translateY(-1px);
}


/*========================================================
    FRIEND ACTIONS & INTERFACE
=========================================================*/

.profile-friend-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.friend-pending-actions {
    display: flex;
    gap: 10px;
}

.friend-add-btn,
.friend-cancel-btn,
.friend-remove-btn,
.friend-accept-btn,
.friend-decline-btn {
    padding: 8px 16px;
    border-radius: 5px;
    font-size: var(--font-size-base);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.friend-add-btn {
    background: #007bff;
    color: white;
}

.friend-add-btn:hover {
    background: #0056b3;
}

.friend-remove-btn {
    background: #6c757d;
    color: white;
}

.friend-remove-btn:hover {
    background: #545b62;
}

.friend-cancel-btn {
    background: #ffc107;
    color: #333;
}

.friend-cancel-btn:hover {
    background: #e0a800;
}

.friend-accept-btn {
    background: #28a745;
    color: white;
}

.friend-accept-btn:hover {
    background: #218838;
}

.friend-decline-btn {
    background: #dc3545;
    color: white;
}

.friend-decline-btn:hover {
    background: #c82333;
}

/*========================================================
    FRIENDS LIST
=========================================================*/
.friends-list-container {
    padding-top: 0;
}

.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.friend-card {
    background: var(--white-glass);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.friend-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.friend-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--white-glass);
    border: 2px solid var(--primary-color);
}

.friend-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.friend-name {
    margin: 10px 0;
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--purple);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-card .button {
    width: 100%;
    padding: 8px 12px;
    font-size: var(--font-size-small);
}

/* Empty state */
.friends-list-container > p {
    text-align: center;
    color: var(--purple);
    font-size: 15px;
}

.friends-list-container h3 {
    color: var(--purple);
    border-radius: 12px; 
    padding: 12px;
    background: rgba(255, 255, 255, 0.35);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/*========================================================
    PENDING REQUESTS SECTION
=========================================================*/

.pending-requests-section {
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--purple);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pending-requests-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.pending-request-card {
    background: var(--white-glass);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.pending-request-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.pending-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--white-glass);
    box-shadow: 0 2px 6px rgba(255, 193, 7, 0.2);
}

.pending-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pending-name {
    margin: 8px 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--purple);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pending-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.pending-actions .button {
    padding: 6px 8px;
    font-size: var(--font-size-small);
    border-radius: 12px;
}

/*========================================================
    NOTIFICATION BADGE
=========================================================*/

.notification-badge {
    display: inline-block;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    font-size: var(--font-size-small);
    font-weight: bold;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.profile-tab-button:has(.notification-badge) {
    position: relative;
}

/*========================================================
    FRIEND CARD ACTIONS
=========================================================*/

.friend-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.friend-card-actions .button {
    padding: 6px 8px;
    font-size: var(--font-size-small);
    border-radius: 12px;
}

/*========================================================
    CONFIRM DIALOG
=========================================================*/

.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white-glass);
    backdrop-filter: blur(18px) saturate(160%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.confirm-dialog {
    background: var(--white-glass-strong);
    backdrop-filter: blur(18px) saturate(160%);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    min-width: 300px;
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

.confirm-dialog-header {
    background: linear-gradient(135deg, var(--pale-mint), var(--pale-purple));
    backdrop-filter: blur(12px);
    color: var(--purple);
    padding: 20px;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.confirm-dialog-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--purple);
}

.confirm-dialog-close {
    background: transparent;
    border: none;
    color: var(--purple);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.confirm-dialog-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--apricot);
}

.confirm-dialog-body {
    padding: 20px;
    color: var(--purple);
    font-size: 15px;
    line-height: 1.6;
}

.confirm-dialog-body p {
    margin: 0;
}

.confirm-dialog-footer {
    padding: 15px 20px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #eee;
}

.confirm-dialog-footer .button {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: all 0.2s ease;
}

.confirm-dialog-cancel {
    background: #f0f0f0;
    color: var(--purple);
}

.confirm-dialog-cancel:hover {
    background: #e0e0e0;
    color: var(--purple);   
}

.confirm-dialog-footer .button-primary {
    background: linear-gradient(135deg, var(--pale-mint), var(--pale-purple));
    backdrop-filter: blur(12px);
    color: var(--purple);
    max-width: none;
}

.confirm-dialog-footer .button-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--color-primary-opacity-30);
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/*========================================================
    3D EMOJI STYLES - OPTIMIERT
=========================================================*/

/* 3D Effekt für Icon-Emojis - Subtil */
.field-label span[style*="margin-right"],
.group-icon span,
[class*="group-icon"] span,
.orga-description-icon span {
    display: inline-block;
    transform: perspective(800px) rotateX(3deg) rotateY(-3deg) translateZ(8px);
    transition: all 0.2s ease;
    line-height: 1;
}

/* Hover-Effekt - Subtil */
.field-label:hover span[style*="margin-right"],
.group-icon:hover span,
[class*="group-icon"]:hover span,
.orga-description-icon:hover span,
a:hover .group-icon span,
a:hover [class*="group-icon"] span {
    transform: perspective(800px) rotateX(-4deg) rotateY(4deg) translateZ(12px) scale(1.08);
}

/* Größe für Profil-Icons - Normal */
.profile-field-display .field-label span {
    font-size: 1.1em;
}

/* Größe für Gruppen-Icons */
.group-tile .group-icon span,
.orga-user-group-icons a span {
    font-size: 1.8em;
    transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateZ(6px);
}

.orga-user-groups a span {
    font-size: 1.2em;
    transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateZ(6px);
}

/* Hover-Effekt für Gruppen-Icons */
.group-tile:hover .group-icon span,
.orga-user-groups a:hover span,
.orga-user-group-icons a:hover span {
    transform: perspective(800px) rotateX(-3deg) rotateY(3deg) translateZ(10px) scale(1.1);
}

/* Leichte Float-Animation */
@keyframes float3d {
    0%, 100% {
        transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateZ(6px) translateY(0px);
    }
    50% {
        transform: perspective(800px) rotateX(2deg) rotateY(-2deg) translateZ(6px) translateY(-4px);
    }
}

/* Float-Animation für Gruppen-Icons */
.group-tile .group-icon span {
    animation: float3d 3s ease-in-out infinite;
}

/*========================================================
    EVENT DETAILS POPUP
=========================================================*/

.event-details-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--pale-mint), var(--color-accent-orange-opacity-25)) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.event-details-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.event-details-modal {
    background: var(--white-glass-strong);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 22px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.event-details-header {
    padding: 18px 24px;
    background: none;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.event-details-header h2 {
    margin: 0;
    color: var(--purple);
    font-size: 24px;
    font-weight: 600;
}

.event-details-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--purple);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.event-details-close:hover {
    background: var(--color-secondary-opacity-10);
    transform: scale(1.1);
}

.event-details-content {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
}

.event-detail-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.event-detail-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.event-detail-row strong {
    display: block;
    color: var(--purple);
    margin-bottom: 5px;
    font-weight: 600;
    font-size: var(--font-size-small);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-detail-row span {
    display: inline-block;
    color: var(--purple);
    font-size: var(--font-size-base);
    line-height: 1.6;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.event-description {
    line-height: 1.6;
    color: var(--purple);
    font-size: var(--font-size-base);
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: inline;
}

.event-description p {
    display: inline;
    margin: 0;
    padding: 0;
}

.event-description p + p {
    margin-left: 0;
}

.event-description br {
    display: none;
}

.event-details-footer {
    padding: 15px 24px;
    background: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
}

.event-details-close-btn {
    background: linear-gradient(135deg, var(--pale-mint), var(--pale-purple));
    backdrop-filter: blur(12px);
    color: var(--purple);
    border: none !important;
    border-radius: 12px !important;
    padding: 10px 30px !important;
    font-size: var(--font-size-base);
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.event-details-close-btn:hover {
    box-shadow: 0 5px 15px var(--color-primary-opacity-30);
    transform: translateY(-2px);
}

/*========================================================
    CALENDAR BOOKINGS STYLES
=========================================================*/

.cc-my-bookings {
    margin: 20px 0;
}

.cc-bookings-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cc-bookings-table thead {
    background: linear-gradient(135deg, var(--pale-mint), var(--pale-purple));
    color: var(--purple);
}

.cc-bookings-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: none;
}

.cc-bookings-table tbody tr {
    border-bottom: none;
    transition: background-color 0.2s ease;
}

.cc-bookings-table tbody tr:hover {
    background-color: var(--color-primary-soft);
}

.cc-bookings-table td {
    padding: 15px;
    vertical-align: middle;
}

.cc-visibility {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--font-size-small);
    font-weight: 600;
}

.cc-visibility.public {
    background-color: var(--color-primary-opacity-20);
    color: #1a8a8f;
}

.cc-visibility.private {
    background-color: var(--color-secondary-opacity-20);
    color: #4a3a5f;
}

/* Calendar buttons */
.cc-view-event,
.cc-cancel-booking,
.cc-toggle-visibility {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-small);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-block;
}

.cc-view-event {
    background: linear-gradient(135deg, var(--color-primary-opacity-30), rgba(46, 196, 201, 0.1));
    color: #1a8a8f;
    border: 1px solid var(--color-primary-opacity-40);
}

.cc-view-event:hover {
    background: linear-gradient(135deg, var(--color-primary-opacity-50), var(--color-primary-opacity-30));
    box-shadow: 0 3px 10px var(--color-primary-opacity-30);
    transform: translateY(-2px);
}

.cc-cancel-booking {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.3), rgba(255, 100, 100, 0.1));
    color: #c74545;
    border: 1px solid rgba(255, 100, 100, 0.4);
}

.cc-cancel-booking:hover {
    background: linear-gradient(135deg, rgba(255, 100, 100, 0.5), rgba(255, 100, 100, 0.3));
    box-shadow: 0 3px 10px rgba(255, 100, 100, 0.3);
    transform: translateY(-2px);
}

.cc-toggle-visibility {
    background: linear-gradient(135deg, var(--color-secondary-opacity-30), var(--color-secondary-opacity-10));
    color: var(--purple);
    border: 1px solid var(--color-secondary-opacity-40);
}

.cc-toggle-visibility:hover {
    background: linear-gradient(135deg, var(--color-secondary-opacity-50), var(--color-secondary-opacity-30));
    box-shadow: 0 3px 10px var(--color-secondary-opacity-30);
    transform: translateY(-2px);
}

/* Button container responsive */
.cc-bookings-table td:last-child{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-between;
}

/*========================================================
    RESPONSIVE DESIGN - MOBILE
=========================================================*/

@media (max-width: 768px) {
    /* Popup & Modal */
    .popup-box {
        width: 100%;
        height: calc(100vh - var(--header-height));
        border-radius: 12px;
        align-self: end;
        display: flex;
        flex-direction: column;
        margin: 10px;
    }

    .profile-image-wrapper {
        width: 90px;
        height: 90px;
    }

    .popup-content {
        flex: 1;
        overflow-y: hidden;
        display: flex;
        flex-direction: column;
        padding: 10px;
    }

    .pf-popup-header {
        padding-bottom: 10px !important;
        flex-shrink: 0;
    }

    .pf-popup-header h2 {
        margin-bottom: 0 !important;
        font-size: 1.2rem !important;
    }

    /* Profile Header */
    .profile-header {
        flex-direction: column;
        max-height: none;
        align-items: flex-start;
        text-align: center;
        margin-bottom: 10px;
    }

    .profile-header h2 {
        width: 100%;
        text-align: center;
    }

    .profile-header .button {
        width: 100%;
        text-align: center;
        font-size: 0.8rem !important;
        padding: 5px !important;
    }

    .profile-header-info {
        width: 100%;
        grid-template-columns: 1fr;
        align-items: center;
        gap: 15px;
    }

    .profile-header-names h2 {
        font-size: 1.1rem;
    }

    .orga-user-group-icons span {
        font-size: 20px !important;
    }

    .profile-header-info h2 {
        text-align: center;
        margin: 0;
    }

    /* Tabs & Navigation */
    .profile-tabs {
        display: none !important;
        flex-shrink: 0;
    }

    .profile-form-content {
        height: 100%;
    }

    .profile-tab-content {
        max-height: 100%;
        overflow-y: auto;
        padding: 0 !important;
    }

    .profile-tab-button {
        font-size: var(--font-size-small);
        padding: 12px 10px !important;
    }

    .pg-nav-btn {
        display: flex;
    }

    /* Grids & Layout */
    .profile-display-grid,
    .profile-fields-grid {
        grid-template-columns: 1fr;
        gap: 10px !important;
    }

    .orga-profile-view {
        padding: 10px !important;
        flex: 1;
        display: contents;
    }

    /* Field Display */
    .profile-field-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .profile-field-display .field-label {
        width: auto;
        margin-bottom: 3px;
        font-size: 0.75rem !important;
    }

    .profile-field-display .field-value {
        font-size: 0.8rem !important;
    }

    .profile-friend-actions {
        margin-top: 0;
        flex-wrap: nowrap;
    }

    .section-title h3{
        font-size: 0.95rem;
    }

    /* Form Actions */
    .form-actions {
        justify-content: flex-end;
        align-items: center;
    }

    .form-actions .button {
        width: auto;
        padding: 5px 10px;
        font-size: var(--font-size-small);
    }

    #delete-account-btn .button {
        padding: 5px 10px !important;
        font-size: 12px !important;
    }


    .notification-item {
        gap: 0 !important;
        padding-bottom: 0 !important;
    }

    .notification-categories {
        gap: 12px !important;
    }
    .control-item .toggle-wrapper {
        width:24px !important;
    }
    /* Avatar Selection */
    .avatar-selection-content {
        padding: 20px;
    }

    .avatars-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 10px;
    }

    /* Friends List */
    .friends-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 15px;
        padding: 10px !important;
    }

    .friend-card {
        padding: 10px !important;
        margin: 0.5rem 0 !important;
    }

    .friend-name {
        font-size: 0.8rem !important;
    }
    .friend-avatar {
        width: 80px;
        height: 80px;
    }

    .friends-section .section-title h3 {
        margin: 10px;
    }

    .friend-card-actions .button {
        padding: 5px; 
        font-size: 0.7rem;
    }

    .friend-pending-actions {
        flex-direction: column;
        width: 100%;
    }

    .friend-pending-actions .button {
        width: 100%;
    }

    /* Pending Requests */
    .pending-requests-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 10px;
    }

    .pending-avatar {
        width: 70px;
        height: 70px;
    }

    .pending-request-card {
        padding: 10px;
    }

    .pending-name {
        font-size: var(--font-size-small);
    }

    .pending-actions {
        gap: 5px;
    }

    .pending-actions .button {
        padding: 5px 6px;
        font-size: 11px;
    }

    /* Event Details Modal */
    .event-details-modal {
        width: 95%;
        max-height: 90vh;
        border-radius: 16px;
    }
    
    .event-details-header h2 {
        font-size: var(--font-size-xl);
    }

    .event-details-header {
        padding: 10px 20px;
    }
    
    .event-details-content {
        padding: 10px 20px;
        padding-top: 0;
    }

    .event-details-footer {
        padding: 10px 20px;
        padding-top: 0;
    }
    .event-detail-row {
        margin-bottom: 10px;
        padding-bottom: 0; 
        border-bottom: none;
    }
    .event-details-close-btn {
        padding: 5px 10px !important;
        font-size: 0.8rem !important;
    }
    .cc-my-bookings {
        padding: 10px;
    }
    /* Calendar Bookings */
    .cc-bookings-table th,
    .cc-bookings-table td {
        padding: 5px 10px;
        font-size: 0.75rem;
        display: table-cell;
    }

    .cc-visibility {
        display: flex;
        align-self: center;
        justify-self: center;
    }
    
    .cc-view-event,
    .cc-cancel-booking,
    .cc-toggle-visibility {
        padding: 6px;
        font-size: var(--font-size-small);
    }

    .cc-bookings-table td:last-child {
        justify-content: start;
    }
}




