/* Container - starts collapsed */
    #img-desc-container {
        display: flex;
        flex-direction: column;
        transition: all 0.3s ease;
        position: relative;
    }

    /* Collapsible content - hidden by default */
    .desc-collapsible-content {
        display: none;
        flex-direction: column;
        gap: 12px;
    }

    /* Selected Description Card (non-crop view) */
    .selected-desc-card {
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        overflow: hidden;
        border-left: 4px solid #9ccee1;
    }

    .selected-desc-card.visitor {
        border-left: none;
        background: #fafafa;
    }

    .selected-desc-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 14px;
        background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
        border-bottom: 1px solid #e2e8f0;
    }

    .selected-desc-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        font-size: 0.85rem;
        color: #1e293b;
    }

    .selected-desc-title i {
        color: #9ccee1;
    }

    .selected-desc-actions {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .selected-desc-meta {
        background: linear-gradient(135deg, #9ccee1, #5ba3b8);
        color: white;
        padding: 3px 10px;
        border-radius: 12px;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .selected-desc-btn {
        width: 30px;
        height: 30px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        background: #ffffff;
        color: #64748b;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .selected-desc-btn:hover {
        background: #9ccee1;
        color: white;
        border-color: #9ccee1;
    }

    .selected-desc-body {
        padding: 12px 14px;
    }

    .selected-desc-body .img-descr-text {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #475569;
    }

    .no-selection-msg {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #94a3b8;
        font-size: 0.85rem;
        font-style: italic;
    }

    .no-selection-msg i {
        color: #cbd5e1;
    }

    /* Expanded state - overlay from bottom */
    #img-desc-container.expanded .desc-collapsible-content {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 80vh;
        background: white;
        z-index: 1050;
        padding: 20px;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
        border-top: 2px solid #9ccee1;
        animation: slideUpFromBottom 0.3s ease;
        overflow-y: auto;
    }

    @@keyframes slideUpFromBottom {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Header styling when expanded */
    #img-desc-container.expanded .img-desc-header {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        z-index: 1051;
        padding: 12px 20px;
        border-top: 2px solid #9ccee1;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.2);
        margin: 0;
    }

    /* Adjust content position when header is fixed */
    #img-desc-container.expanded .desc-collapsible-content {
        padding-bottom: 70px; /* Space for fixed header */
    }

    /* Add backdrop overlay */
    #img-desc-container.expanded::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1049;
        animation: fadeIn 0.3s ease;
    }

    @@keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    /* Header */
    .img-desc-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        cursor: pointer;
    }

    .img-desc-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        color: #1e293b;
    }

    .img-desc-title i {
        color: #9ccee1;
    }

    .desc-count {
        background: #9ccee1;
        color: white;
        padding: 2px 8px;
        border-radius: 12px;
        font-size: 0.75rem;
        font-weight: 600;
    }

    .img-desc-actions {
        display: flex;
        gap: 8px;
    }

    .btn-clear-selection {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 6px 10px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        background: #fef2f2;
        color: #ef4444;
        font-size: 0.75rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .btn-clear-selection:hover {
        background: #fee2e2;
        border-color: #fecaca;
    }

    .btn-expand-toggle {
        width: 32px;
        height: 32px;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        background: #f8fafc;
        color: #64748b;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-expand-toggle:hover {
        background: #9ccee1;
        color: white;
        border-color: #9ccee1;
    }

    #img-desc-container.expanded .btn-expand-toggle i {
        transform: rotate(180deg);
    }

    /* Description List */
    .desc-list-container {
        flex: 1;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        gap: 10px;
        max-height: none;
        padding-right: 4px;
    }

    .empty-desc-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 24px;
        color: #94a3b8;
        text-align: center;
    }

    .empty-desc-state i {
        font-size: 2rem;
        margin-bottom: 8px;
    }

    .empty-desc-state p {
        margin: 0;
        font-size: 0.9rem;
    }

    /* Description Card */
    .desc-card {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 10px 12px;
        transition: all 0.2s ease;
        border-left: 3px solid #cbd5e1;
    }

    .desc-card:hover {
        border-color: #cbd5e1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }

    .desc-card.selected {
        background: linear-gradient(135deg, #f0f9ff 0%, #e8f5fa 100%);
        border-color: #9ccee1;
        border-left-color: #9ccee1;
    }

    .desc-card-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 8px;
    }

    /* Custom Radio */
    .desc-radio-label {
        position: relative;
        cursor: pointer;
        display: flex;
        align-items: center;
    }

    .desc-radio-label input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
    }

    .radio-custom {
        width: 18px;
        height: 18px;
        border: 2px solid #cbd5e1;
        border-radius: 50%;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .radio-custom::after {
        content: '';
        width: 8px;
        height: 8px;
        background: #9ccee1;
        border-radius: 50%;
        opacity: 0;
        transform: scale(0);
        transition: all 0.2s ease;
    }

    .desc-radio-label input:checked + .radio-custom {
        border-color: #9ccee1;
    }

    .desc-radio-label input:checked + .radio-custom::after {
        opacity: 1;
        transform: scale(1);
    }

    /* Meta info */
    .desc-meta {
        flex: 1;
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .desc-target {
        background: linear-gradient(135deg, #9ccee1, #5ba3b8);
        color: white;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
    }

    .desc-model {
        color: #64748b;
        font-size: 0.7rem;
        padding: 2px 6px;
        background: #e2e8f0;
        border-radius: 4px;
    }

    /* Card Actions */
    .desc-card-actions {
        display: flex;
        gap: 4px;
        opacity: 0.3;
        transition: opacity 0.2s ease;
    }

    .desc-card:hover .desc-card-actions {
        opacity: 1;
    }

    .desc-btn {
        width: 28px;
        height: 28px;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        transition: all 0.2s ease;
    }

    .desc-btn-copy {
        background: #f1f5f9;
        color: #64748b;
    }

    .desc-btn-copy:hover {
        background: #9ccee1;
        color: white;
    }

    .desc-btn-delete {
        background: #f1f5f9;
        color: #94a3b8;
    }

    .desc-btn-delete:hover {
        background: #fef2f2;
        color: #ef4444;
    }

    /* Card Body */
    .desc-card-body {
        font-size: 0.85rem;
        color: #475569;
        line-height: 1.4;
    }

    .desc-card-body .img-descr-text {
        max-height: none;
        overflow-y: auto;
    }

    /* Generate Section */
    .generate-section {
        padding-top: 12px;
        border-top: 2px solid #e2e8f0;
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
    }

    .generate-input-group {
        flex: 1;
    }

    .generate-input {
        width: 100%;
        padding: 10px 12px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        font-size: 0.85rem;
        transition: all 0.2s ease;
    }

    .generate-input:focus {
        outline: none;
        border-color: #9ccee1;
        box-shadow: 0 0 0 3px rgba(156, 206, 225, 0.2);
    }

    .generate-controls {
        display: flex;
        gap: 10px;
    }

    .generate-select {
        flex: 1;
        padding: 8px 12px;
        border: 2px solid #e2e8f0;
        border-radius: 8px;
        font-size: 0.85rem;
        background: white;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .generate-select:focus {
        outline: none;
        border-color: #9ccee1;
    }

    .btn-generate {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 20px;
        background: linear-gradient(135deg, #9ccee1 0%, #5ba3b8 100%);
        color: white;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.85rem;
        cursor: pointer;
        transition: all 0.2s ease;
        box-shadow: 0 2px 8px rgba(156, 206, 225, 0.4);
    }

    .btn-generate:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(156, 206, 225, 0.5);
    }

    .btn-generate:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

    /* Close button when expanded */
    #img-desc-container.expanded .btn-expand-toggle {
        background: #ef4444;
        color: white;
        border-color: #ef4444;
    }

    #img-desc-container.expanded .btn-expand-toggle:hover {
        background: #dc2626;
        border-color: #dc2626;
    }

    /* Scrollbar styling */
    .desc-list-container::-webkit-scrollbar,
    .desc-collapsible-content::-webkit-scrollbar {
        width: 6px;
    }

    .desc-list-container::-webkit-scrollbar-track,
    .desc-collapsible-content::-webkit-scrollbar-track {
        background: #f1f5f9;
        border-radius: 3px;
    }

    .desc-list-container::-webkit-scrollbar-thumb,
    .desc-collapsible-content::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 3px;
    }

    .desc-list-container::-webkit-scrollbar-thumb:hover,
    .desc-collapsible-content::-webkit-scrollbar-thumb:hover {
        background: #9ccee1;
    }

    /* Click backdrop to close */
    #img-desc-container.expanded .img-desc-header {
        pointer-events: auto;
    }