/* Virtual Data Rooms Styles */
/* Using specific selectors to avoid conflicts with existing styles */

#data-rooms-page .data-rooms-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--spacing-lg);
}

/* Page Header */
#data-rooms-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid #e5e7eb;
}

#data-rooms-page .page-description {
    color: #6b7280;
    margin: 8px 0 0 0;
    font-size: 14px;
}

/* Rooms List */
#data-rooms-page .rooms-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#data-rooms-page .room-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    transition: all 0.2s ease;
    cursor: pointer;
}

#data-rooms-page .room-item:hover {
    border-color: #042847;
    box-shadow: 0 4px 12px rgba(4, 40, 71, 0.1);
    transform: translateY(-1px);
}

#data-rooms-page .room-info {
    min-width: 0;
}

#data-rooms-page .room-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    position: relative;
}

#data-rooms-page .room-name {
    font-size: 18px;
    font-weight: 600;
    color: #042847;
    margin: 0;
    flex: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#data-rooms-page .unread-count {
    color: #6b7280;
    font-weight: 400;
    font-size: 14px;
}

/* Status Badges - Removed (now using standardized badge system from components.css) */

#data-rooms-page .room-description {
    color: #6b7280;
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.4;
}

#data-rooms-page .room-meta {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

#data-rooms-page .meta-item {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

#data-rooms-page .room-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
}

#data-rooms-page .room-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 160px;
    margin-right: 0px;
}

/* Grid layout for 5 buttons (3 in top row, 2 in bottom) */
#data-rooms-page .room-actions-grid {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    width: 250px;
}

/* Make share and analytics span specific positions in the grid */
#data-rooms-page .room-actions-grid > button:nth-child(4) {
    grid-column: 1; /* Share button - bottom left */
    grid-row: 2;
}

#data-rooms-page .room-actions-grid > button:nth-child(5) {
    grid-column: 2 / 4; /* Analytics button - bottom spanning 2 columns */
    grid-row: 2;
}

#data-rooms-page .room-actions .btn {
    width: 100%;
}


/* Sidebar Styles */
#data-rooms-page .rooms-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0; /* Remove gap to avoid double spacing with card margins */
}

#data-rooms-page .stats-card .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

#data-rooms-page .stat-item {
    text-align: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
}

#data-rooms-page .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #042847;
    margin-bottom: 4px;
    margin-top: 18px;
}

#data-rooms-page .stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#data-rooms-page .stat-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

#data-rooms-page .stat-clickable:hover {
    background: #042847;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 40, 71, 0.15);
}

#data-rooms-page .stat-clickable .stat-value,
#data-rooms-page .stat-clickable .stat-label {
    transition: color 0.2s ease;
}

#data-rooms-page .stat-clickable:hover .stat-value,
#data-rooms-page .stat-clickable:hover .stat-label,
#data-rooms-page .stat-clickable:hover .stat-action {
    color: white;
}

#data-rooms-page .stat-action {
    font-size: 10px;
    color: #6b7280;
    margin-top: 4px;
    font-weight: 500;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.2s ease;
}

#data-rooms-page .stat-clickable:hover .stat-action {
    opacity: 1;
    transform: translateY(0);
}

/* Activity List */
#data-rooms-page .activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

#data-rooms-page .activity-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
}

#data-rooms-page .activity-icon {
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#data-rooms-page .activity-content {
    flex: 1;
    min-width: 0;
}

#data-rooms-page .activity-content p {
    margin: 0 0 4px 0;
    font-size: 13px;
    line-height: 1.4;
}

#data-rooms-page .activity-time {
    font-size: 11px;
    color: #9ca3af;
}

/* Quick Actions */
#data-rooms-page .quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

#data-rooms-page .btn-block {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    display: flex;
    align-items: center;
}

#data-rooms-page .btn-block i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    #data-rooms-page .data-rooms-grid {
        grid-template-columns: 1fr;
    }

    #data-rooms-page .rooms-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    #data-rooms-page .room-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #data-rooms-page .room-privacy {
        justify-content: flex-start;
        order: -1;
    }

    #data-rooms-page .room-actions {
        width: 100%;
        grid-template-columns: 1fr 1fr;
        margin-right: 0;
    }
}

@media (max-width: 640px) {
    #data-rooms-page .stats-card .stats-grid {
        grid-template-columns: 1fr;
    }

    #data-rooms-page .activity-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

/* Animation for new room creation */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#data-rooms-page .room-item.new {
    animation: slideInUp 0.3s ease;
}

/* Loading states */
#data-rooms-page .rooms-list.loading {
    opacity: 0.6;
    pointer-events: none;
}

#data-rooms-page .loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #042847;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success and error states */
#data-rooms-page .status-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

#data-rooms-page .status-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

#data-rooms-page .status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Analytics Modal Styles */
.analytics-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.analytics-section h4 {
    margin: 0 0 16px 0;
    color: #042847;
    font-size: 16px;
    font-weight: 600;
}

#data-rooms-page .stats-row,
.analytics-section .stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 0px;
    border-top: none;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #042847;
    margin-bottom: 8px;
}

.stat-box .stat-label {
    font-size: 13px;
    color: #6b7280;
}

/* Visitor List */
.visitor-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.visitor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.visitor-info strong {
    display: block;
    color: #374151;
    font-size: 14px;
    margin-bottom: 2px;
}

.visitor-email {
    font-size: 12px;
    color: #6b7280;
}

.visitor-activity {
    text-align: right;
    margin-top: 6px;
}

.activity-type {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 0px;
}

.visitor-activity .activity-time {
    font-size: 11px;
    color: #9ca3af;
}

/* Document Performance */
.document-performance {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.performance-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.performance-item .doc-name {
    width: 120px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: #374151;
}

.performance-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.performance-fill {
    height: 100%;
    background: #ffd502;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.performance-number {
    font-size: 12px;
    color: #6b7280;
    width: 60px;
    text-align: right;
}

/* Responsive for Analytics */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .visitor-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .visitor-activity {
        text-align: left;
    }

    .performance-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .performance-item .doc-name {
        width: auto;
    }
}

/* QR Code Section */
.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.qr-placeholder {
    width: 150px;
    height: 150px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
}

/* Edit Room Modal Layout */
.edit-room-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
    align-items: start; /* Prevent equal height columns */
    grid-auto-rows: auto; /* Allow rows to size naturally */
}

.edit-room-settings h4,
.edit-room-documents h4 {
    margin: 0 0 16px 0;
    color: #042847;
    font-size: 16px;
    font-weight: 600;
}

/* Section Order Container */
.section-order-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 8px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-height: 200px;
    position: relative;
}

.draggable-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: move;
    transition: all 0.2s ease;
    user-select: none;
}

.draggable-section:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.draggable-section.dragging {
    opacity: 0.5;
    background: #e0f2fe;
    border-color: #0284c7;
}

.draggable-section.drag-over {
    background: #fef3c7;
    border-color: #fbbf24;
}

.drag-handle {
    color: #9ca3af;
    font-size: 12px;
    letter-spacing: 2px;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.section-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

/* Document Categories */
.document-categories {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.document-category h5 {
    margin: 0 0 12px 0;
    color: #042847;
    font-size: var(--font-size-lg);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.document-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Data room edit modal document layout - vertical stacking */
.modal .document-item {
    margin-bottom: 16px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    display: flex !important;
    flex-direction: column !important;
}

.modal .document-item.selected {
    border-color: var(--imi-blue);
    background-color: rgba(4, 40, 71, 0.02);
}

.modal .document-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    margin: 0; /* Remove any default label margins */
    line-height: 1; /* Normalize line height */
}

/* Ensure checkbox and text elements don't add extra spacing */
.modal .document-header input[type="checkbox"] {
    margin: 0;
    vertical-align: baseline;
}

.modal .document-header .doc-info {
    display: flex;
    align-items: center;
    margin: 0;
    line-height: 1;
}

.modal .document-header .doc-name {
    margin: 0;
    line-height: 1;
    display: inline; /* Override the block display */
    font-size: var(--font-size-sm);
    font-weight: 400;
}

/* Hide the doc icon in modal */
.modal .document-header .doc-icon {
    display: none;
}

/* Make doc-info full width and left-aligned */
.modal .document-header .doc-info {
    flex: 1;
    text-align: left;
}

.modal .document-item.selected .document-header {
    border-bottom: 1px solid var(--medium-gray);
}

/* Removed duplicate - modal document item styles already exist above */

/* Modal-specific styles for document options */
.modal .document-options {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
    display: none; /* Completely hide when collapsed */
}

.modal .document-options.visible {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    max-height: 300px;
    width: 100%; /* Ensure full width */
    gap: 16px; /* Use gap instead of margins for spacing */
}

.modal .doc-permissions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0;
}

.modal .doc-permissions-row label {
    font-weight: 500;
    color: var(--imi-blue);
    font-size: var(--font-size-sm);
    min-width: 80px;
}

.modal .permission-select {
    flex: 1;
    max-width: 150px;
    padding: 6px 8px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    background: #ffffff;
}

.modal .doc-description-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.modal .doc-description-row label {
    font-weight: 500;
    color: var(--imi-blue);
    font-size: var(--font-size-sm);
}

.modal .doc-description-input {
    width: 100%;
    min-height: 32px;
    height: 32px;
    padding: 8px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--font-size-sm);
    line-height: 1.4;
    resize: vertical;
    transition: border-color var(--transition-fast);
}

.modal .doc-description-input:focus {
    outline: none;
    border-color: var(--imi-blue);
    box-shadow: 0 0 0 2px rgba(4, 40, 71, 0.1);
}

.modal .doc-description-row .help-text {
    font-size: 11px;
    color: var(--text-gray);
    font-style: italic;
}

/* Description type selector - horizontal flex layout with wrapping */
.description-type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.description-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.description-option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.description-option span {
    font-size: 14px;
    color: var(--imi-dark-gray);
}

/* Default preview and custom description visibility */
.default-preview,
.custom-description-container {
    display: none;
    margin-top: 8px;
}

.default-preview.visible,
.custom-description-container.visible {
    display: block;
}

.default-preview {
    font-size: 13px;
    color: var(--text-gray);
    padding: 8px;
    background: var(--light-gray);
    border-radius: 4px;
    font-style: italic;
}

/* Modal footer now uses global .modal-footer and .modal-footer-actions from modal.css */

/* Button classes removed - now using standardized .btn.btn-primary.btn-sm and .btn.btn-secondary.btn-sm from components.css */

/* Responsive for Edit Modal */
@media (max-width: 1024px) {
    .edit-room-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Request and Comment Modal Styles */
.request-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 16px;
}

.tab-button {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    height: auto;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tab-button:hover {
    border-color: #042847;
    color: #042847;
}

.tab-button.active {
    background: #042847;
    color: white;
    border-color: #042847;
}

/* Request and Comment Cards */
.requests-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.request-card,
.comment-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.request-card {
    background: white;
}

.comment-card {
    background: #fffbf0;
}

.request-card:hover,
.comment-card:hover {
    border-color: #042847;
    box-shadow: 0 4px 12px rgba(4, 40, 71, 0.1);
}

.comment-card.read {
    background: white;
}

.request-header,
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.requester-info h4,
.commenter-info h4 {
    margin: 0 0 4px 0;
    color: #042847;
    font-size: 16px;
    font-weight: 600;
}

.requester-title,
.commenter-title {
    margin: 0 0 2px 0;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.requester-email,
.commenter-email {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.request-time,
.comment-time {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    overflow: hidden;
    max-width: 150px;
    flex-shrink: 0;
}

.time-badge {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.unread-indicator {
    background: #ef4444 !important;
    color: white !important;
    font-weight: 600;
}

.request-details,
.comment-details {
    margin-bottom: 20px;
}

.requested-room,
.commented-room {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.detail-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

.room-name-tag {
    background: #042847;
    color: white;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

.document-tag {
    background: #ffd502;
    color: #042847;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
}

/* Data rooms request/comment message styling (used in modals which are outside #data-rooms-page) */
.request-message,
.comment-message {
    font-size: 15px;
    color: var(--text-gray);
    line-height: 1.4;
    margin: 8px 0 0 0;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--imi-yellow);
}

/* Request Actions */
.request-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.time-limit-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-limit-group label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

.time-limit-select {
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    background: white;
    color: #374151;
}

.action-buttons {
    display: flex;
    gap: 8px;
}


/* Comment Actions */
.comment-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.comment-actions-left {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-actions-right {
    display: flex;
    align-items: center;
}


/* Responsive for Request/Comment Modals */
@media (max-width: 768px) {
    .request-tabs {
        flex-wrap: wrap;
    }

    .request-header,
    .comment-header {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .request-time,
    .comment-time {
        align-items: flex-start;
    }

    .request-actions {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .time-limit-group {
        justify-content: space-between;
    }

    .action-buttons {
        justify-content: center;
    }

    .btn-approve,
    .btn-deny {
        flex: 1;
        max-width: 120px;
    }

}

@media (max-width: 640px) {
    .tab-button {
        font-size: 11px;
        padding: 6px 12px;
    }

    .request-card,
    .comment-card {
        padding: 16px;
    }

    .message-text {
        padding: 8px;
        font-size: 12px;
    }
}

/* Duplicate CSS removed - consolidated above */

/* Achievements Selection Styles */
.achievements-selector-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.achievement-selector-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selector-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--imi-blue);
}

.achievement-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.achievement-select:hover {
    border-color: var(--imi-blue);
}

.achievement-select:focus {
    outline: none;
    border-color: var(--imi-yellow);
    box-shadow: 0 0 0 3px rgba(255, 213, 2, 0.1);
}

.achievement-preview {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.achievement-description {
    color: #6b7280;
    flex: 1;
}

.verified-badge {
    background: linear-gradient(135deg, var(--imi-blue), #073a66);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.achievements-help-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.achievements-help-section a {
    color: var(--imi-blue);
    text-decoration: underline;
}

.achievements-help-section a:hover {
    color: var(--imi-yellow);
}

/* Edit Room Achievements Section */
.edit-room-achievements {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    min-height: auto;
    height: auto;
    transition: all 0.3s ease;
    overflow: visible;
}

.achievements-selector-list {
    min-height: auto;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.achievement-selector-item {
    min-height: auto;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Ensure achievement previews don't add fixed height */
.achievement-preview {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Container should size to fit content */
.edit-room-documents,
.edit-room-settings {
    min-height: auto;
    height: auto;
    align-self: start;
}