/**
 * Button Styles
 * 버튼 컴포넌트 전용 스타일
 */

/* ===========================================
   에디터
   =========================================== */
button {
    line-height: 1 !important;
}

.mce-btn button:hover {
    background: none;
}

/* ===========================================
   기본 버튼 스타일
   =========================================== */

.btn, .kaice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--theme-button-padding);
    border: none;
    border-radius: var(--theme-button-radius);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--theme-font-normal);
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
    white-space: nowrap;
}

/* 기본 버튼 disabled 상태 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-large {
    width: 100%;
}

/* ===========================================
   버튼 변형들
   =========================================== */

/* Primary 버튼 */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--theme-button-padding);
    background: var(--theme-main-color);
    color: white;
    border: 1px solid var(--theme-main-color);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-weight: 500;
    font-family: var(--theme-font-normal);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-primary:hover {
    background: var(--theme-button-hover-bg);
    border-color: var(--theme-button-hover-bg);
    color: white;
    text-decoration: none;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary .kaice-icon {
    color: #FFF;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--theme-button-padding);
    background: var(--theme-secondary-button-bg);
    color: white;
    border: 1px solid var(--theme-secondary-button-bg);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-weight: 500;
    font-family: var(--theme-font-normal);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background: var(--theme-secondary-button-hover-bg);
    border-color: var(--theme-secondary-button-hover-bg);
    color: white;
    text-decoration: none;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

[class^="btn-"].sm {
    font-size: var(--theme-font-size-small);
    padding: 4px 8px;
    line-height: 1;
}

.btn-edit {
    padding: var(--theme-button-padding);
    color: var(--theme-main-color);
    background: #fff;
    border: 1px solid var(--theme-main-color);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
}

.btn-edit:hover {
    background: var(--theme-info-bg);
    text-decoration: none;
}

.btn-danger {
    padding: var(--theme-button-padding);
    color: var(--theme-danger-button-bg);
    background: #fff;
    border: 1px solid var(--theme-danger-button-bg);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-family: var(--theme-font-normal);
}

.btn-danger:hover {
    background: var(--theme-delete-button-hover-bg);
    text-decoration: none;
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--theme-button-padding);
    background: var(--theme-cancel-button-bg);
    color: white;
    border: 1px solid var(--theme-cancel-button-bg);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-weight: 500;
    font-family: var(--theme-font-normal);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-cancel:hover {
    background: var(--theme-cancel-button-hover-bg);
    border-color: var(--theme-cancel-button-hover-bg);
    color: white;
    text-decoration: none;
}

.btn-cancel:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--theme-button-padding);
    background: #fff;
    color: var(--theme-text-color);
    border: 1px solid var(--theme-item-border);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-weight: 500;
    font-family: var(--theme-font-normal);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-white:hover {
    background: var(--theme-item-bg);
    text-decoration: none;
}

.btn-normal {
    background: #fff;
    border: 1px solid var(--theme-item-border);
    color: var(--theme-text-color);
    border-radius: var(--theme-button-radius);
    gap: 5px;
    font-family: var(--theme-font-normal);
}

.btn-normal:hover {
    background: var(--theme-info-bg);
    border: 1px solid var(--theme-main-color);
    color: var(--theme-main-color);
}

.btn-normal.selected {
    background: var(--theme-main-color);
    border: none;
    color: #fff;
}

.btn-normal.selected:hover {
    background: var(--theme-button-hover-bg);
    border: none;
    color: #fff;
}

/* Light 버튼 */
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: var(--theme-button-padding);
    background: #fff;
    color: var(--theme-main-color);
    border: 1px solid var(--theme-main-color);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-weight: 500;
    font-family: var(--theme-font-normal);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    box-sizing: border-box;
}

.btn-light:hover {
    background: var(--theme-info-bg);
    text-decoration: none;
}

.btn-light:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Outline 버튼 - 둥근 테두리 변형 */
.kaice-btn-outline {
    border-radius: 30px;
}

/* Small 버튼 - btn-으로 시작하는 모든 클래스에 .small 적용 */
[class*="btn-"].small {
    padding: 0.5rem 1rem;
    font-size: var(--theme-font-size-small);
    line-height: 1;
}

/* ===========================================
   버튼 반응형 디자인
   =========================================== */

@media (max-width: 768px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: var(--theme-font-size-button);
    }
}

/* ===========================================
   Back 버튼 (KAICE News Clipping)
   =========================================== */

.btn-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: var(--theme-button-padding) !important;
    background: white !important;
    border: 1px solid #ccc !important;
    border-radius: var(--theme-button-radius) !important;
    text-decoration: none !important;
    color: #333 !important;
    font-size: var(--theme-font-size-button) !important;
    font-weight: 500 !important;
    font-family: var(--theme-font-normal) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

.btn-back svg,
.btn-back .kaice-icon,
.btn-back i {
    color: inherit !important;
    flex-shrink: 0 !important;
    font-size: var(--theme-font-size-icon-small) !important;
}

.btn-back span {
    color: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    font-family: inherit !important;
}

.btn-back:hover {
    background: #f8f9fa !important;
    border-color: #999 !important;
    color: #333 !important;
    text-decoration: none !important;
}

/* ===========================================
   텍스트 버튼 (링크 스타일)
   =========================================== */

.btn-text {
    display: inline-block;
    color: var(--theme-text-color);
    font-size: var(--theme-font-size-small);
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-text-danger {
    color: var(--theme-danger-button-bg);
}

.btn-text-danger:hover {
    color: var(--theme-danger-button-hover-bg);
}

/* ===========================================
   Google 로그인 버튼
   =========================================== */

.kaice-btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--theme-button-padding);
    background: #fff;
    color: #444;
    border: 1px solid #ddd;
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-weight: 500;
    font-family: var(--theme-font-normal);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    box-sizing: border-box;
}

.kaice-btn-google:hover {
    background: #f8f8f8;
    text-decoration: none;
}

.kaice-btn-google svg {
    flex-shrink: 0;
    margin-right: 8px;
}

