/* QR Code Support Styles */

/* QRスキャンボタン */
.qr-scan-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 101;
    background: rgba(126, 190, 165, 0.9);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.qr-scan-button:hover {
    background: rgba(126, 190, 165, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* QRスキャナーモーダル */
.qr-scanner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-scanner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.qr-scanner-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.qr-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #7EBEA5;
    color: #fff;
    border-bottom: 2px solid #6aa890;
}

.qr-scanner-header h3 {
    margin: 0;
    font-size: 18px;
}

.qr-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: transform 0.2s;
}

.qr-close-btn:hover {
    transform: scale(1.2);
}

.qr-scanner-body {
    padding: 20px;
}

/* ビデオコンテナ */
.qr-scanner-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
}

#qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-scanner-overlay-frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    border: 3px solid #7EBEA5;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
}

/* 説明文 */
.qr-scanner-instructions {
    text-align: center;
    margin-bottom: 20px;
}

.qr-scanner-instructions p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.qr-hint {
    font-size: 12px;
    color: #666;
}

/* 手動入力 */
.qr-manual-input {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    margin-top: 15px;
}

.qr-manual-input p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #666;
}

.qr-manual-input input {
    width: calc(100% - 90px);
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    margin-right: 10px;
}

.qr-manual-input input:focus {
    outline: none;
    border-color: #7EBEA5;
}

.qr-submit-btn {
    padding: 10px 20px;
    background: #7EBEA5;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.qr-submit-btn:hover {
    background: #6aa890;
}

/* レスポンシブ */
@media (max-width: 768px) {
    .qr-scan-button {
        bottom: 60px;
        right: 10px;
        padding: 8px 16px;
        font-size: 12px;
    }

    .qr-scanner-content {
        width: 95%;
        max-height: 90vh;
    }

    .qr-scanner-header {
        padding: 12px 15px;
    }

    .qr-scanner-header h3 {
        font-size: 16px;
    }

    .qr-scanner-body {
        padding: 15px;
    }

    .qr-manual-input input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .qr-submit-btn {
        width: 100%;
    }
}
