/* 태그 생성 모달 스타일 */
.tag-modal,
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

/* 모달이 표시될 때 */
.modal {
    display: block;
}

.tag-modal-content,
.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s;
    position: relative;
}

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

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tag-modal h3 {
    margin-top: 0;
    color: #333;
}

.tag-input-group {
    margin-bottom: 20px;
}

.tag-input-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-size: 14px;
}

.tag-input-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.color-option {
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.color-option:hover {
    transform: scale(1.05);
}

.color-option.selected {
    border-color: #333;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #333;
}

.custom-color-input {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-color-input input[type="color"] {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
}

.custom-color-input input[type="text"] {
    flex: 1;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.modal-btn-create {
    background-color: #667eea;
    color: white;
}

.modal-btn-create:hover {
    background-color: #5567d8;
}

.modal-btn-cancel {
    background-color: #f0f0f0;
    color: #333;
}

.modal-btn-cancel:hover {
    background-color: #e0e0e0;
}

/* 모달 헤더 스타일 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

/* 모달 바디 */
.modal-body {
    padding: 10px 0;
}

/* 태그 선택 리스트 */
.tag-selection-list {
    max-height: 300px;
    overflow-y: auto;
}

.tag-selection-item {
    cursor: pointer;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    transition: transform 0.2s;
}

.tag-selection-item:hover {
    transform: translateX(5px);
}

/* 태그 삭제 버튼 스타일 */
.tag-delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.tag-delete-btn:hover {
    background-color: #c82333;
}