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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    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-bold);
    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: 0.75rem 1.5rem;
    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-bold);
    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: 0.75rem 1.5rem;
    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-bold);
    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;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--theme-danger-button-bg);
    color: white;
    border: 1px solid var(--theme-danger-button-bg);
    border-radius: var(--theme-button-radius);
    font-size: var(--theme-font-size-button);
    font-weight: 500;
    font-family: var(--theme-font-bold);
    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-danger:hover {
    background: var(--theme-danger-button-hover-bg);
    border-color: var(--theme-danger-button-hover-bg);
    color: white;
    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: 0.75rem 1.5rem;
    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-bold);
    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;
}


/* Light 버튼 */
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    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-bold);
    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;
}

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

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

/* ===========================================
   버튼 접근성
   =========================================== */

.btn-primary:focus,
.btn-secondary:focus,
.btn-danger:focus,
.btn-cancel:focus,
.btn-light:focus,
.btn-back:focus {
    outline: 2px solid var(--theme-main-color);
    outline-offset: 2px;
}

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

.btn-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    padding: 10px 16px !important;
    background-color: white !important;
    border: 1px solid #ccc !important;
    border-radius: var(--theme-button-radius) !important;
    text-decoration: none !important;
    color: #333 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: var(--theme-font-bold) !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 {
    color: inherit !important;
    flex-shrink: 0 !important;
}

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

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