/**
 * 步驟四 - 個人資料卡片式設計
 * Profile Info Cards - Step 4 Modern Design
 */

/* ========================================
   資訊卡片容器
   ======================================== */
.profile-info-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 900px;
    padding: 0 1rem;
}

/* ========================================
   單一資訊卡片 - 白底有框設計
   ======================================== */
.info-card {
    background: #ffffff;
    border-radius: var(--wizard-radius-md);
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 2px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 1rem;
    position: relative;
    overflow: visible;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
    border-color: #6366f1;
}

/* Icon - 白底有框顯眼設計 */
.info-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.info-card:hover .info-card-icon {
    border-color: #6366f1;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: scale(1.05);
}

.info-card-icon i {
    width: 24px;
    height: 24px;
    stroke: #6366f1;
    stroke-width: 2.5;
}

/* 不同卡片的 Icon 顏色 */
.info-card:nth-child(1) .info-card-icon {
    border-color: #c7d2fe;
}

.info-card:nth-child(1) .info-card-icon i {
    stroke: #6366f1;
}

.info-card:nth-child(1):hover .info-card-icon {
    border-color: #6366f1;
    background: #eef2ff;
}

.info-card:nth-child(2) .info-card-icon {
    border-color: #ddd6fe;
}

.info-card:nth-child(2) .info-card-icon i {
    stroke: #8b5cf6;
}

.info-card:nth-child(2):hover .info-card-icon {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.info-card:nth-child(3) .info-card-icon {
    border-color: #a5f3fc;
}

.info-card:nth-child(3) .info-card-icon i {
    stroke: #06b6d4;
}

.info-card:nth-child(3):hover .info-card-icon {
    border-color: #06b6d4;
    background: #ecfeff;
}

.info-card:nth-child(4) .info-card-icon {
    border-color: #a7f3d0;
}

.info-card:nth-child(4) .info-card-icon i {
    stroke: #10b981;
}

.info-card:nth-child(4):hover .info-card-icon {
    border-color: #10b981;
    background: #ecfdf5;
}

/* Content */
.info-card-content {
    flex: 1;
    min-width: 0;
}

/* ========================================
   卡片 3 & 4 佔滿整行
   ======================================== */
.info-card:nth-child(3),
.info-card:nth-child(4) {
    grid-column: span 2;
}

/* Label - 最小14px */
.info-card-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.info-card-label .required {
    color: #ef4444;
    margin-left: 2px;
}

/* Input - 完整邊框設計 */
.info-card-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    transition: all 0.3s ease;
    font-family: inherit;
}

.info-card-input:hover {
    border-color: #cbd5e1;
}

.info-card-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.info-card-input::placeholder {
    color: #94a3b8;
}

/* Hint */
.info-card-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
}

.info-card-hint i {
    flex-shrink: 0;
    stroke: #6366f1;
    opacity: 0.7;
}

/* ========================================
   響應式設計
   ======================================== */

/* 平板 & 手機 - 全部卡片佔滿整行 */
@media (max-width: 768px) {
    .profile-info-cards {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0;
    }

    /* 重置卡片 3 & 4 的 span，確保單欄顯示正常 */
    .info-card:nth-child(3),
    .info-card:nth-child(4) {
        grid-column: span 1;
    }

    .info-card {
        padding: 1.25rem;
    }

    .info-card-icon {
        width: 44px;
        height: 44px;
    }

    .info-card-icon i {
        width: 22px;
        height: 22px;
    }
}

/* 手機 */
@media (max-width: 480px) {
    .profile-info-cards {
        gap: 1rem;
    }

    .info-card {
        flex-direction: column;
        padding: 1.25rem;
        gap: 1rem;
    }

    .info-card-icon {
        width: 56px;
        height: 56px;
        margin: 0 auto;
    }

    .info-card-icon i {
        width: 28px;
        height: 28px;
    }

    .info-card-content {
        text-align: center;
    }

    .info-card-label {
        font-size: 1rem;
    }

    .info-card-input {
        font-size: 1rem;
        padding: 0.85rem 1rem;
    }

    .info-card-hint {
        justify-content: center;
        font-size: 0.9rem;
    }
}

/* ========================================
   下拉選單特殊樣式（與卡片配合）
   ======================================== */

/* 確保 Bootstrap-Select 在卡片中正常顯示 */
.info-card .bootstrap-select {
    width: 100% !important;
}

.info-card .bootstrap-select .dropdown-toggle {
    width: 100%;
    border: 2px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    padding: 0.75rem 1rem !important;
    min-height: auto !important;
    font-size: 14px !important;
}

.info-card .bootstrap-select .dropdown-toggle:hover {
    border-color: #cbd5e1 !important;
}

.info-card .bootstrap-select.show .dropdown-toggle,
.info-card .bootstrap-select .dropdown-toggle:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
}

/* ========================================
   微妙動畫效果
   ======================================== */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-card {
    animation: cardFadeIn 0.5s ease-out backwards;
}

.info-card:nth-child(1) {
    animation-delay: 0.1s;
}

.info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.info-card:nth-child(3) {
    animation-delay: 0.3s;
}

.info-card:nth-child(4) {
    animation-delay: 0.4s;
}