/* Frontend Styles for Survey Plugin */

/* 既存のスタイル */
.yaruo-survey-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rank-number {
    font-size: 24px;
    font-weight: bold;
    margin-right: 20px;
    min-width: 60px;
    color: #333;
}

.work-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.votes {
    color: #666;
    font-size: 14px;
}

/* Bug #9修正: ローディング表示のスタイル */
.yaruo-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.yaruo-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

.yaruo-overlay p {
    color: #fff;
    margin-top: 15px;
    font-size: 16px;
}

/* Bug #9修正: メッセージ表示のスタイル */
.yaruo-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    max-width: 400px;
    display: none;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.yaruo-message-success {
    background: #4caf50;
    color: #fff;
}

.yaruo-message-error {
    background: #f44336;
    color: #fff;
}

/* エラーメッセージ */
.error-message {
    color: #f44336;
    padding: 15px;
    background: #ffebee;
    border-left: 4px solid #f44336;
    margin: 20px 0;
}

/* サジェスト表示 */
.yaruo-suggestions {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.yaruo-suggestions ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.yaruo-suggestions li {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.yaruo-suggestions li:hover {
    background: #f5f5f5;
}
