/* Document Download Manager - Frontend CSS */

/* ダウンロードフォームのコンテナ */
.ddm-download-container {
    max-width: 700px;
    margin: 50px auto;
    padding: 0;
    background: transparent;
}

/* ダウンロードフォームがあるページのみ、WordPressのデフォルトタイトルとパンくずを非表示 */
body.single:has(.ddm-download-container) .entry-title,
body.page:has(.ddm-download-container) .entry-title,
body.single:has(.ddm-download-container) .entry-header,
body.page:has(.ddm-download-container) .entry-header,
body:has(.ddm-download-container) .breadcrumbs,
body:has(.ddm-download-container) .breadcrumb,
body:has(.ddm-download-container) nav.breadcrumb {
    display: none !important;
}

/* アイキャッチ画像 */
.ddm-thumbnail {
    width: 100%;
    margin-bottom: 30px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.ddm-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* 資料タイトル部分 */
.ddm-document-info {
    margin-bottom: 30px;
}

.ddm-quote-block {
    background: #f8f8f8;
    border-left: 4px solid #4a6da7;
    padding: 20px;
    margin: 0;
}

.ddm-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

.ddm-description {
    font-size: 15px;
    color: #555;
    margin: 15px 0 0 0;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* ダウンロードボタン */
.ddm-button-container {
    text-align: center;
    margin-bottom: 30px;
}

.ddm-show-form-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 48px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.ddm-show-form-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* フォームラッパー */
.ddm-form-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

/* フォームグループ */
.ddm-form-group {
    margin-bottom: 20px;
}

.ddm-form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.ddm-required {
    color: #e74c3c;
}

.ddm-form-group input,
.ddm-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ddm-form-group input:focus,
.ddm-form-group textarea:focus {
    outline: none;
    border-color: #4a6da7;
}

/* 個人情報保護方針チェックボックス */
.ddm-privacy-group {
    margin-top: 25px;
    margin-bottom: 25px;
}

.ddm-privacy-label {
    display: flex;
    align-items: center;
    font-weight: normal !important;
    cursor: pointer;
    margin-bottom: 0 !important;
}

.ddm-privacy-label input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    transform: scale(1.3);
}

.ddm-privacy-label a {
    color: #4a6da7;
    text-decoration: underline;
    margin: 0 4px;
}

.ddm-privacy-label a:hover {
    color: #667eea;
}

/* 送信ボタン */
.ddm-form-actions {
    text-align: center;
    margin-top: 30px;
}

.ddm-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.ddm-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ddm-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* メッセージ */
.ddm-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.ddm-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ddm-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .ddm-download-container {
        max-width: 100%;
        padding: 0 20px;
        margin: 30px auto;
    }
    
    .ddm-form-wrapper {
        padding: 20px;
    }
    
    .ddm-title {
        font-size: 18px;
    }
    
    .ddm-show-form-btn,
    .ddm-submit-btn {
        padding: 12px 30px;
        font-size: 14px;
    }
}
