/* Gemini診断プラグイン専用CSS */

.gemini-diagnosis-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: #f8faff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.gemini-diagnosis-form h3 {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #1f2937;
    margin-bottom: 1rem;
}

.gemini-diagnosis-form p {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.diagnosis-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.diagnosis-form label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.diagnosis-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.diagnosis-form textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.diagnosis-button {
    width: 100%;
    background: #4f46e5;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.diagnosis-button:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
}

.diagnosis-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.diagnosis-button.loading {
    background: #9ca3af;
    cursor: wait;
}

.diagnosis-button .arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.diagnosis-button:hover .arrow {
    transform: translateX(4px);
}

/* モーダルスタイル */
.gemini-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #4f46e5;
    margin: 0;
}

.close-modal {
    font-size: 2rem;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    border: none;
    background: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #6b7280;
    background: #f3f4f6;
}

/* ローディング */
.loading-section {
    text-align: center;
    padding: 4rem 2rem;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-section p {
    font-size: 1.1rem;
    color: #6b7280;
    font-weight: 600;
}

/* 結果セクション */
.result-section {
    padding: 2rem;
}

.disclaimer {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.result-card {
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid;
}

.result-card.before {
    background: #fef2f2;
    border-color: #fecaca;
}

.result-card.after {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.result-card h4 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-card.before h4 {
    color: #dc2626;
}

.result-card.after h4 {
    color: #16a34a;
}

.result-card p {
    color: #374151;
    line-height: 1.6;
    margin: 0;
}

.recommendation {
    background: #eef2ff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #c7d2fe;
    margin-bottom: 2rem;
}

.recommendation h4 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.5rem;
}

.recommendation p {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4f46e5;
    margin: 0;
}

.cta-section {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.cta-section p {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #374151;
}

.contact-button {
    display: inline-block;
    background: #4f46e5;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background: #4338ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(79, 70, 229, 0.3);
    text-decoration: none;
    color: white;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .gemini-diagnosis-container {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .gemini-diagnosis-form h3 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .modal-header h3 {
        font-size: 1.5rem;
    }
    
    .result-section {
        padding: 1.5rem;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .diagnosis-form {
        padding: 1.5rem;
    }
    
    .diagnosis-button {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
}

/* body固定用（モーダル表示時） */
body.modal-open {
    overflow: hidden;
}

/* アクセシビリティ対応 */
.diagnosis-button:focus,
.contact-button:focus {
    outline: 3px solid rgba(79, 70, 229, 0.5);
    outline-offset: 2px;
}

.diagnosis-form textarea:focus {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* スムーズなアニメーション */
.gemini-modal {
    transition: opacity 0.3s ease;
}

.result-section {
    animation: slideUp 0.4s ease-out;
}

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

/* エラー状態のスタイル */
.diagnosis-form textarea.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* プリント用スタイル */
@media print {
    .gemini-modal {
        position: static;
        background: none;
        display: block !important;
    }
    
    .modal-content {
        box-shadow: none;
        border: 1px solid #ccc;
        margin: 0;
        width: 100%;
        max-width: none;
    }
    
    .close-modal,
    .contact-button {
        display: none;
    }
}