/**
 * 動画購入管理システム フロントエンド用CSS
 */

/* 購入ボタンラッパー */
.video-purchase-button-wrapper {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    text-align: center;
}

/* 購入情報 */
.purchase-info {
    margin-bottom: 15px;
}

.purchase-info p {
    margin: 5px 0;
    font-size: 16px;
}

.required-points strong {
    color: #dc3545;
    font-size: 24px;
}

.current-points strong {
    color: #28a745;
    font-size: 20px;
}

/* 購入ボタン */
.video-purchase-button {
    background: #007cba;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.video-purchase-button:hover {
    background: #005a87;
}

.video-purchase-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ポイント不足 */
.insufficient-points {
    padding: 15px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    color: #721c24;
}

.insufficient-points p {
    margin: 5px 0;
}

.shortage {
    font-weight: bold;
    font-size: 18px;
}

/* ログイン要求 */
.video-purchase-login-required {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.video-purchase-login-required .button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 25px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

/* 購入済みメッセージ */
.video-purchase-completed {
    padding: 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    color: #155724;
    text-align: center;
    font-weight: bold;
}

/* 購入プロンプト */
.video-purchase-prompt {
    position: relative;
    padding: 40px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    text-align: center;
    margin: 30px 0;
}

.video-purchase-prompt h3 {
    margin-bottom: 20px;
    color: #333;
}

.video-purchase-prompt .required-points {
    font-size: 20px;
    margin-bottom: 20px;
}

.video-purchase-prompt .button {
    display: inline-block;
    padding: 12px 30px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
}

/* マイ購入動画 */
.my-purchased-videos {
    margin: 30px 0;
}

.my-purchased-videos h3 {
    margin-bottom: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.purchased-video-item {
    border: 1px solid #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.2s;
}

.purchased-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.purchased-video-item img {
    width: 100%;
    height: auto;
}

.purchased-video-item h4 {
    padding: 10px;
    margin: 0;
    font-size: 16px;
}

.purchase-meta {
    padding: 10px;
    background: #f8f9fa;
    font-size: 14px;
}

.purchase-meta p {
    margin: 3px 0;
    color: #666;
}

.unavailable-video {
    padding: 50px 20px;
    text-align: center;
    color: #999;
}

/* ローディング */
.video-purchase-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

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