/* Manage Tags Modal Styles - Based on Figma Design */

.manage-tags-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
    padding: 20px;
}

.manage-tags-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 672px; /* 42rem */
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.manage-tags-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.manage-tags-header .header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.manage-tags-header .header-content .glyphicon {
    color: #6B7280;
    font-size: 16px;
}

.manage-tags-header h3 {
    color: #111827;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

.manage-tags-header .close-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s;
}

.manage-tags-header .close-btn:hover {
    color: #6B7280;
}

.manage-tags-header .close-btn .glyphicon {
    font-size: 16px;
}

/* Content */
.manage-tags-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.content-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.content-description h4 {
    color: #111827;
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.content-description p {
    color: #6B7280;
    font-size: 14px;
    margin: 0;
    line-height: 1.4;
}

.new-tag-btn {
    background: #3B82F6 !important;
    border-color: #3B82F6 !important;
    color: white !important;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.new-tag-btn:hover,
.new-tag-btn:focus {
    background: #2563EB !important;
    border-color: #2563EB !important;
    color: white !important;
}

.new-tag-btn .glyphicon {
    font-size: 12px;
}

/* Create Tag Form */
.create-tag-form {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.create-tag-form h5 {
    color: #111827;
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.create-tag-form .form-group {
    margin-bottom: 12px;
}

.create-tag-form label {
    display: block;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.4;
}

.create-tag-form .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.create-tag-form .form-control:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
    outline: none;
}

.create-tag-form .form-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
}

.create-tag-form .btn {
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s;
}

.create-tag-form .btn-primary {
    background: #3B82F6 !important;
    border-color: #3B82F6 !important;
    color: white !important;
}

.create-tag-form .btn-primary:hover:not(:disabled) {
    background: #2563EB !important;
    border-color: #2563EB !important;
}

.create-tag-form .btn-primary:disabled {
    background: #D1D5DB !important;
    border-color: #D1D5DB !important;
    cursor: not-allowed;
}

.create-tag-form .btn-default {
    background: white !important;
    border-color: #D1D5DB !important;
    color: #374151 !important;
}

.create-tag-form .btn-default:hover {
    background: #F9FAFB !important;
    border-color: #D1D5DB !important;
    color: #374151 !important;
}

/* Tags List */
.tags-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tag-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.tag-item:hover {
    border-color: #D1D5DB;
}

.tag-item span {
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-container img {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
}

.loading-container p {
    color: #6B7280;
    font-size: 14px;
    margin: 0;
}

/* Footer */
.manage-tags-footer {
    padding: 16px 24px;
    border-top: 1px solid #E5E7EB;
    background: #F9FAFB;
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}

.done-btn {
    background: #3B82F6 !important;
    border-color: #3B82F6 !important;
    color: white !important;
    font-size: 14px;
    padding: 8px 24px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.done-btn:hover,
.done-btn:focus {
    background: #2563EB !important;
    border-color: #2563EB !important;
    color: white !important;
}

/* Spinning animation for loading */
.spinning {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .manage-tags-overlay {
        padding: 10px;
    }
    
    .manage-tags-modal {
        max-width: 100%;
        max-height: 90vh;
    }
    
    .content-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .new-tag-btn {
        align-self: flex-start;
    }
}