/**
 * 내 호스팅 — 토스 스타일 UI
 * ⚠️ WooCommerce 마이계정 페이지에서만 로드
 */

/* ── 리셋 ── */
.terra-hosting-list * { box-sizing: border-box; }

/* ── 전체 래퍼 ── */
.terra-hosting-wrap {
    max-width: 640px;
}

/* ── 사이트 선택 드롭다운 ── */
.terra-hosting-selector {
    margin-bottom: 1rem;
}
.terra-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #191f28;
    background: #fff;
    border: 1px solid #e5e8eb;
    border-radius: 12px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238b95a1' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    transition: border-color 0.15s, box-shadow 0.15s;
    letter-spacing: -0.01em;
}
.terra-select:focus {
    outline: none;
    border-color: #3182f6;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
}
.terra-select:hover {
    border-color: #d1d6db;
}

/* ── 리스트 ── */
.terra-hosting-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 640px;
}

/* ── 카드 ── */
.terra-hosting-card {
    background: #fff;
    border-radius: 16px;
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.terra-hosting-card:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.08);
}

/* ── 카드 헤더 ── */
.terra-hosting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 1.5rem;
    background: #fafbfc;
    border-bottom: 1px solid #f2f4f6;
}
.terra-hosting-type {
    font-weight: 700;
    font-size: 1rem;
    color: #191f28;
    letter-spacing: -0.02em;
}
.terra-hosting-status {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3125rem 0.75rem;
    border-radius: 100px;
    letter-spacing: -0.01em;
}
.terra-status-active {
    background: #e8f7f0;
    color: #00b386;
}
.terra-status-suspended {
    background: #fff0f0;
    color: #f04452;
}

/* ── 정보 영역 ── */
.terra-hosting-info {
    padding: 0.5rem 1.5rem 0.75rem;
}
.terra-hosting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid #f2f4f6;
}
.terra-hosting-row:last-child {
    border-bottom: none;
}
.terra-hosting-label {
    font-size: 0.875rem;
    color: #8b95a1;
    font-weight: 500;
    min-width: 100px;
    flex-shrink: 0;
}
.terra-hosting-value {
    font-size: 0.9375rem;
    color: #191f28;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
    letter-spacing: -0.01em;
}

/* ── 링크 ── */
.terra-hosting-link {
    color: #3182f6;
    text-decoration: none;
    transition: color 0.15s;
}
.terra-hosting-link:hover {
    color: #1b64da;
}

/* ── 비밀번호 토글 ── */
.terra-hosting-password {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}
.terra-pw-masked {
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    color: #b0b8c1;
}
.terra-pw-toggle {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border: 1px solid #e5e8eb;
    border-radius: 6px;
    background: #fff;
    color: #6b7684;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: -0.01em;
}
.terra-pw-toggle:hover {
    background: #f2f4f6;
    border-color: #d1d6db;
}

/* ── 액션 버튼 영역 ── */
.terra-hosting-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f2f4f6;
    background: #fafbfc;
    flex-wrap: wrap;
}

/* ── 버튼 공통 ── */
.terra-btn {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5625rem 1rem;
    border: 1px solid #e5e8eb;
    border-radius: 10px;
    background: #fff;
    color: #4e5968;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: -0.01em;
    line-height: 1;
}
.terra-btn:hover {
    background: #f2f4f6;
    border-color: #d1d6db;
}
.terra-btn:active {
    transform: scale(0.97);
}
.terra-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}
.terra-btn-backup {
    color: #00b386;
    border-color: #00b386;
}
.terra-btn-backup:hover {
    background: #e8f7f0;
}
.terra-btn-primary {
    background: #3182f6;
    color: #fff;
    border-color: #3182f6;
}
.terra-btn-primary:hover {
    background: #1b64da;
    border-color: #1b64da;
}

/* ── 소형 버튼 ── */
.terra-btn-sm {
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.3125rem 0.625rem;
    border: 1px solid #e5e8eb;
    border-radius: 6px;
    background: #fff;
    color: #4e5968;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: -0.01em;
}
.terra-btn-sm:hover {
    background: #f2f4f6;
}
.terra-btn-sm:active {
    transform: scale(0.97);
}
.terra-btn-restore {
    color: #3182f6;
    border-color: #3182f6;
}
.terra-btn-restore:hover {
    background: #ebf5ff;
}
.terra-btn-delete {
    color: #f04452;
    border-color: #f04452;
}
.terra-btn-delete:hover {
    background: #fff0f0;
}

/* ── 패널 (백업/비밀번호/도메인) ── */
.terra-panel {
    border-top: 1px solid #f2f4f6;
    animation: terraSlideDown 0.2s ease-out;
}
@keyframes terraSlideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 500px; }
}
.terra-panel-inner {
    padding: 1.25rem 1.5rem;
}
.terra-panel-title {
    font-weight: 700;
    font-size: 0.9375rem;
    color: #191f28;
    margin-bottom: 0.875rem;
    letter-spacing: -0.02em;
}
.terra-panel-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ── 인풋 ── */
.terra-input {
    flex: 1;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e5e8eb;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #191f28;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    letter-spacing: -0.01em;
}
.terra-input::placeholder {
    color: #b0b8c1;
}
.terra-input:focus {
    outline: none;
    border-color: #3182f6;
    box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
}

/* ── 백업 아이템 ── */
.terra-backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f2f4f6;
}
.terra-backup-item:last-child {
    border-bottom: none;
}
.terra-backup-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.terra-backup-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #191f28;
    letter-spacing: -0.01em;
}
.terra-backup-size {
    font-size: 0.75rem;
    color: #b0b8c1;
}
.terra-backup-btns {
    display: flex;
    gap: 0.375rem;
}

/* ── 도메인 ── */
.terra-domain-status {
    margin-top: 1rem;
}
.terra-domain-info {
    margin-top: 0.5rem;
}
.terra-domain-ns {
    margin-top: 0.75rem;
}
.terra-ns-item {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, monospace;
    font-size: 0.8125rem;
    padding: 0.5rem 0.875rem;
    background: #f2f4f6;
    border-radius: 8px;
    margin-bottom: 0.375rem;
    color: #191f28;
    font-weight: 500;
    letter-spacing: 0;
}

/* ── 빈 상태 메시지 ── */
.terra-hosting-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #8b95a1;
}
.terra-hosting-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}
.terra-hosting-empty-text {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* ── 반응형 ── */
@media (max-width: 640px) {
    .terra-hosting-list {
        max-width: 100%;
    }
    .terra-hosting-header {
        padding: 1rem 1.25rem;
    }
    .terra-hosting-info {
        padding: 0.375rem 1.25rem 0.5rem;
    }
    .terra-hosting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
        padding: 0.75rem 0;
    }
    .terra-hosting-value {
        text-align: left;
    }
    .terra-hosting-actions {
        padding: 0.875rem 1.25rem;
        flex-direction: column;
    }
    .terra-btn {
        width: 100%;
        text-align: center;
        padding: 0.6875rem 1rem;
    }
    .terra-panel-inner {
        padding: 1rem 1.25rem;
    }
    .terra-panel-form {
        flex-direction: column;
    }
    .terra-panel-form .terra-btn {
        width: 100%;
    }
    .terra-backup-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.625rem;
    }
}
