/**
 * ポップアップスタイル - モダンなデザイン
 */

/* オーバーレイ */
.psl-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: pslFadeIn 0.3s ease forwards;
}

/* scroll_gradualモード用（JSでopacityを制御） */
.psl-popup-overlay.psl-gradual-mode {
    animation: none;
}

/* WordPress Admin Bar対応 */
.admin-bar .psl-popup-overlay {
    top: 32px;
    height: calc(100% - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .psl-popup-overlay {
        top: 46px;
        height: calc(100% - 46px);
    }
}

@media screen and (max-width: 600px) {
    .admin-bar .psl-popup-overlay {
        top: 0;
        height: 100%;
    }
}

@keyframes pslFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* コンテナ */
.psl-popup-container {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    transform: translateY(20px);
    animation: pslSlideUp 0.4s ease forwards;
}

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

/* 閉じるボタン */
.psl-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.psl-popup-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: rotate(90deg);
}

/* タイトル */
.psl-popup-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.psl-popup-description {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin: 0 0 25px;
}

/* フォーム */
.psl-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 質問 */
.psl-question {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.psl-question-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    display: block;
}

.psl-required {
    color: #e74c3c;
    margin-left: 3px;
}

/* チェックボックス */
.psl-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border: 2px solid #e1e5ea;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.psl-checkbox-label:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.psl-checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    accent-color: #667eea;
    cursor: pointer;
}

.psl-checkbox-label input[type="checkbox"]:checked + .psl-checkbox-text {
    color: #667eea;
    font-weight: 600;
}

.psl-checkbox-text {
    font-size: 14px;
    color: #444;
}

/* テキスト入力 */
.psl-text-input,
.psl-textarea-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 14px;
    border: 2px solid #e1e5ea;
    border-radius: 10px;
    background: #fff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.psl-text-input:focus,
.psl-textarea-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.psl-textarea-input {
    resize: vertical;
    min-height: 80px;
}

/* 送信ボタン */
.psl-submit-button {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.psl-submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

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

.psl-submit-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 特典バナーエリア */
.psl-reward-banner {
    text-align: center;
    animation: pslFadeIn 0.5s ease;
}

.psl-reward-title {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 10px;
}

.psl-reward-message {
    font-size: 14px;
    color: #666;
    margin: 0 0 25px;
}

/* バナーリンク */
.psl-banner-link {
    display: block;
    text-decoration: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #06d6a0 0%, #00b894 100%);
    box-shadow: 0 4px 20px rgba(6, 214, 160, 0.3);
}

.psl-banner-link:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(6, 214, 160, 0.4);
}

.psl-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.psl-banner-text {
    display: block;
    padding: 20px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

/* LINEバナー用の特別スタイル */
.psl-banner-link.psl-line-banner {
    background: linear-gradient(135deg, #00b900 0%, #00c300 100%);
}

/* ローディング */
.psl-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: pslSpin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* エラーメッセージ */
.psl-error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 15px;
}

/* レスポンシブ */
@media (max-width: 600px) {
    .psl-popup-container {
        padding: 20px;
        border-radius: 15px;
    }
    
    .psl-popup-title {
        font-size: 20px;
    }
    
    .psl-submit-button {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .psl-checkbox-label {
        padding: 10px 12px;
    }
}
