/**
 * Contact Page Styles
 * LED診断・お問い合わせページ専用スタイル
 */

/* ========================================
   Contact Type Selection
   ======================================== */
.contact-type-btn.selected {
    background: linear-gradient(135deg, var(--delta-blue) 0%, #0a2060 100%) !important;
    border-color: var(--delta-blue) !important;
}

.contact-type-btn.selected h3,
.contact-type-btn.selected p {
    color: white !important;
}

/* 图标容器背景 - 选中状态使用半透明白色 */
.contact-type-btn.selected .w-16,
.contact-type-btn.selected .w-10 {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* SVG 图标颜色 - 选中状态变为白色 */
.contact-type-btn.selected svg {
    color: white !important;
}

/* 右上角勾选圆圈 - 选中状态显示 */
.contact-type-btn.selected > .absolute {
    opacity: 1 !important;
    border-color: white !important;
    background-color: white !important;
}

/* 勾选圆圈内的 SVG 保持深蓝色 */
.contact-type-btn.selected > .absolute svg {
    color: var(--delta-blue) !important;
}

/* ========================================
   Progress Steps
   ======================================== */
.progress-step.active .step-dot {
    background: var(--delta-blue);
    color: white;
}

.progress-step.active .step-label {
    color: var(--delta-blue);
    font-weight: 700;
}

.progress-step.completed .step-dot {
    background: #10b981;
    color: white;
}

.progress-step.completed .step-dot::after {
    content: '✓';
    font-size: 0.875rem;
}

.progress-step.completed .step-dot span {
    display: none;
}

/* ========================================
   Distance Simulator
   ======================================== */
.distance-simulator {
    position: relative;
}

.simulator-scene {
    background: linear-gradient(180deg, #bae6fd 0%, #7dd3fc 50%, #38bdf8 100%);
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

/* LED Screen - Large & Prominent */
.led-screen {
    transform-style: preserve-3d;
    background: linear-gradient(180deg, #0a0a15 0%, #1a1a2e 100%);
    box-shadow: 
        -15px 0 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(6, 182, 212, 0.2),
        inset 0 0 30px rgba(0, 0, 0, 0.6);
}

/* Remove old ::before, now handled in HTML */

@keyframes ledGlow {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Enhanced LED Glow Animation */
@keyframes led-glow {
    0%, 100% { 
        opacity: 0.5;
        box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.3);
    }
    50% { 
        opacity: 0.8;
        box-shadow: inset 0 0 40px rgba(6, 182, 212, 0.5), 0 0 30px rgba(6, 182, 212, 0.3);
    }
}

.animate-led-glow {
    animation: led-glow 2s ease-in-out infinite;
}

.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Person Container */
.person-container {
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.person-container:active {
    cursor: grabbing;
}

.person-svg {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
    transition: transform 0.15s ease;
}

.person-container:hover .person-svg {
    transform: scale(1.05);
}

.person-container:active .person-svg {
    transform: scale(0.95);
}

/* Distance Label */
.distance-label {
    transition: all 0.15s ease;
    white-space: nowrap;
}

/* Drag Hint Animation */
.drag-hint {
    animation: hintBounce 2s ease-in-out infinite;
}

@keyframes hintBounce {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
        opacity: 1;
    }
    50% { 
        transform: translateX(-50%) translateY(-8px); 
        opacity: 0.8;
    }
}

.drag-hint.hidden {
    display: none !important;
}

/* ========================================
   Scene Cards
   ======================================== */
.scene-card {
    position: relative;
    overflow: hidden;
}

.scene-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(15, 47, 142, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scene-card:hover::before {
    opacity: 1;
}

.scene-card.selected {
    border-color: var(--delta-blue) !important;
    background: linear-gradient(135deg, rgba(15, 47, 142, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.scene-card.selected .selected-indicator {
    opacity: 1;
}

/* ========================================
   Size Presets
   ======================================== */
.size-preset {
    position: relative;
    overflow: hidden;
}

.size-preset.selected {
    border-color: var(--delta-blue) !important;
    background: linear-gradient(135deg, rgba(15, 47, 142, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.size-preset.selected .selected-indicator {
    opacity: 1;
}

/* ========================================
   Product Cards - Modern Design
   ======================================== */
.product-card {
    border: 1px solid rgba(15, 47, 142, 0.1);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    position: relative;
}

.product-card:hover {
    border-color: var(--delta-blue);
    box-shadow: 0 20px 50px rgba(15, 47, 142, 0.15);
    transform: translateY(-4px);
}

.product-card.recommended {
    border: 2px solid var(--delta-blue);
    background: linear-gradient(135deg, rgba(15, 47, 142, 0.02) 0%, rgba(52, 182, 212, 0.02) 100%);
}

.product-card.recommended::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--delta-blue) 0%, #34b6d4 50%, var(--delta-blue) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.product-card .recommend-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--delta-blue) 0%, #34b6d4 100%);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(15, 47, 142, 0.3);
    z-index: 10;
}

.product-card .recommend-badge svg {
    width: 14px;
    height: 14px;
}

.product-content {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .product-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
}

.product-image {
    background: linear-gradient(145deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 1rem;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
}

.product-image-placeholder {
    width: 85%;
    height: 75%;
    background: linear-gradient(135deg, #0f2f8e 0%, #1e40af 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 12px rgba(15, 47, 142, 0.2);
}

.product-info h4 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
}

.product-series {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(15, 47, 142, 0.08) 0%, rgba(52, 182, 212, 0.08) 100%);
    color: var(--delta-blue);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.product-feature {
    background: #f1f5f9;
    color: #475569;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.product-specs {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    margin-top: 0.5rem;
}

.product-spec {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-spec-label {
    color: #94a3b8;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-spec-value {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
}

.product-action {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-width: 150px;
}

.product-action .btn-primary {
    background: linear-gradient(135deg, var(--delta-blue) 0%, #1e40af 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(15, 47, 142, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-action .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(15, 47, 142, 0.35);
}

.product-action .btn-secondary {
    background: white;
    color: var(--delta-blue);
    padding: 0.65rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.8rem;
    border: 2px solid var(--delta-blue);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-action .btn-secondary:hover {
    background: rgba(15, 47, 142, 0.05);
}

@media (max-width: 768px) {
    .product-action {
        width: 100%;
        flex-direction: row;
    }
    
    .product-action button,
    .product-action a {
        flex: 1;
    }
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--delta-blue) !important;
    box-shadow: 0 0 0 3px rgba(15, 47, 142, 0.1);
}

/* ========================================
   Modal Styles - Premium Design
   ======================================== */
#led-contact-modal {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#led-contact-modal.show {
    display: flex !important;
}

#led-contact-modal > div {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Container */
.modal-container {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    max-width: 520px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Modal Header */
.modal-header {
    background: linear-gradient(135deg, var(--delta-blue) 0%, #1e40af 100%);
    padding: 1.5rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.modal-header h2 {
    font-size: 1.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

.modal-header h2 svg {
    width: 28px;
    height: 28px;
    opacity: 0.9;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
    padding: 1.75rem 2rem 2rem;
}

/* Diagnosis Result Box */
.diagnosis-result {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #0369a1;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.diagnosis-result::before {
    content: '📋';
    font-size: 1.25rem;
}

.diagnosis-result strong {
    color: #0c4a6e;
    font-weight: 700;
}

/* Form Labels */
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #ef4444;
    margin-left: 0.25rem;
}

/* Form Inputs */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.875rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: var(--delta-blue);
    background: white;
    box-shadow: 0 0 0 4px rgba(15, 47, 142, 0.1);
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--delta-blue) 0%, #1e40af 100%);
    color: white;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(15, 47, 142, 0.3);
    margin-top: 1.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 47, 142, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   Success/Error Messages
   ======================================== */
.form-message {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ========================================
   Loading States
   ======================================== */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Responsive Adjustments - Mobile
   ======================================== */
@media (max-width: 640px) {
    /* Contact Type Selection - HTML 已设置响应式类，这里仅做微调 */
    .contact-type-btn h3 {
        font-size: 0.9375rem !important;
    }
    
    .contact-type-btn p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }

    /* Distance Simulator - 手机版调整 */
    .simulator-scene {
        height: 200px;
    }
    
    .led-screen {
        width: 36px !important;
        right: 2px !important;
        top: 4px !important;
        bottom: 56px !important;
        border-width: 2px !important;
    }
    
    .led-screen .text-lg {
        font-size: 0.625rem !important;
    }
    
    .led-screen .text-\[8px\] {
        font-size: 6px !important;
    }
    
    /* LED Stand */
    .led-screen + div {
        right: 12px !important;
        bottom: 44px !important;
        width: 20px !important;
        height: 10px !important;
    }
    
    /* Modal Styles - 手机端 */
    .modal-container {
        border-radius: 1rem;
    }
    
    .modal-header {
        padding: 1rem 1.25rem;
    }
    
    .modal-header h2 {
        font-size: 1rem !important;
    }
    
    .modal-header h2 svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    .modal-body {
        padding: 1rem 1.25rem 1.25rem;
    }
    
    .form-label {
        font-size: 0.75rem !important;
    }
    
    .form-input {
        padding: 0.625rem 0.75rem !important;
        font-size: 0.875rem !important;
        border-radius: 0.625rem !important;
    }
    
    .form-group {
        margin-bottom: 0.875rem !important;
    }
    
    .submit-btn {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        margin-top: 1rem !important;
    }
    
    /* Product Cards - 手机端 */
    .product-card .recommend-badge {
        padding: 4px 10px;
        font-size: 0.625rem;
        top: 8px;
        left: 8px;
    }
    
    .product-content {
        padding: 0.875rem !important;
    }
    
    .product-image {
        height: 80px !important;
        border-radius: 0.625rem !important;
    }
    
    .product-info h4 {
        font-size: 1rem !important;
    }
    
    .product-series {
        font-size: 0.625rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .product-feature {
        font-size: 0.625rem !important;
        padding: 0.2rem 0.4rem !important;
    }
    
    .product-specs {
        gap: 0.75rem !important;
        padding: 0.5rem !important;
    }
    
    .product-spec-label {
        font-size: 0.5625rem !important;
    }
    
    .product-spec-value {
        font-size: 0.8125rem !important;
    }
    
    .product-action .btn-primary,
    .product-action .btn-secondary {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
}

/* ========================================
   Animations
   ======================================== */
.step-section {
    animation: fadeSlideIn 0.4s ease;
}

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

/* Product Card Entrance Animation */
.product-card {
    animation: cardSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

@keyframes cardSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for interactive elements */
button,
a,
input,
textarea,
.scene-card,
.size-preset,
.product-card {
    transition: all 0.2s ease;
}

/* Focus visible for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--delta-blue);
    outline-offset: 2px;
}
