/* WP Chart Race - Front Styles */

.wcr-chart-container {
    width: 100%;
    margin: 2rem auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    padding: 20px 0;
    transition: background-image 0.3s;
}

.wcr-chart.wcr-has-bg {
    padding: 50px !important;
    box-sizing: border-box;
}

/* アイコンスタイル */
.wcr-icon-circle {
    height: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
    box-sizing: border-box;
    display: inline-block;
    background-color: #fff;
}

/* ローディング */
.wcr-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #888;
    z-index: 10;
}
.wcr-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: wcr-spin 1s linear infinite;
}
@keyframes wcr-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* チャート内テキスト */
.wcr-chart-title {
    text-align: center;
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: #666;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}
.wcr-time-label {
    font-size: 2rem;
    font-weight: 800;
    text-align: right;
    margin-bottom: 15px;
    color: #ccc;
    line-height: 1;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}
.wcr-scale-wrap {
    position: relative;
    height: 30px;
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    width: 100%;
}
.wcr-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px dashed #eee;
    transform: translateX(-50%);
    pointer-events: none;
}
.wcr-tick:first-child {
    border-left: 1px solid #ddd;
}
.wcr-tick-text {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #888;
    white-space: nowrap;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 4px;
    z-index: 1;
}
.wcr-bars-wrap {
    position: relative;
    width: 100%;
    margin-top: 5px;
    overflow: hidden;
}
.wcr-bar-row {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    will-change: transform;
}
.wcr-row-label {
    text-align: right;
    padding-right: 15px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    display: none;
    color: var(--wcr-text-color, #333);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}
.wcr-row-bar-area {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}
.wcr-bar {
    height: 100%;
    background: #4e79a7;
    border-radius: 0 4px 4px 0;
    opacity: 0.9;
    transition: width 0.1s linear;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    overflow: hidden;
}
.wcr-bar-label-internal {
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7), -1px -1px 2px rgba(0, 0, 0, 0.7), 1px -1px 2px rgba(0, 0, 0, 0.7), -1px 1px 2px rgba(0, 0, 0, 0.7);
    max-width: 100%;
    text-overflow: ellipsis;
    box-sizing: border-box;
    z-index: 2;
}
.wcr-row-value {
    margin-left: 10px;
    font-weight: bold;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: var(--wcr-text-color, #555);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

/* コントロールエリア */
.wcr-controls {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 0 10px 0;
    border-top: 1px solid #eee;
}
.wcr-btn-icon {
    background: transparent !important; /* !important を追加 */
    border: none !important; /* !important を追加 */
    cursor: pointer;
    padding: 5px !important; /* !important を追加 */
    color: var(--wcr-text-color, #555);
    border-radius: 50% !important; /* !important を追加 */
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px !important; /* !important を追加 */
    height: 40px !important; /* !important を追加 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important; /* !important を追加 */
    line-height: normal !important; /* 追加: テーマのline-height干渉を防ぐ */
    box-sizing: border-box !important; /* 追加: サイズ計算を統一 */
    margin: 0 !important; /* 追加: 余計なマージンを削除 */
}
.wcr-btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--wcr-text-color, #555);
}
.wcr-btn-icon svg {
    width: 24px;
    height: 24px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}
.wcr-seek-bar {
    flex-grow: 1;
    cursor: pointer;
    margin: 0 10px;
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}
.wcr-seek-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #2271b1;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}
.wcr-seek-bar::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}
.wcr-seek-bar::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #2271b1;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* アップロードフォーム周りのデザイン */
.wcr-front-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}
.wcr-form-title,
.wcr-success-title {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-size: 1.5rem;
}
.wcr-success-title {
    color: #00796b;
}
.wcr-message {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-weight: bold;
}
.wcr-message.wcr-error {
    background-color: #fce8e2;
    color: #d32f2f;
    border-left: 5px solid #d32f2f;
}
.wcr-message.wcr-success {
    background-color: #e8f8f5;
    color: #00796b;
    border-left: 5px solid #00796b;
}
.wcr-form-group {
    margin-bottom: 20px;
}
.wcr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #444;
}
.wcr-input-lg {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
}
.wcr-radio-group {
    display: flex;
    gap: 20px;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}
.wcr-file-input-wrapper {
    background: #f9f9f9;
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 4px;
    text-align: center;
}
.wcr-help-text {
    font-size: 0.85rem;
    color: #777;
    margin-top: 5px;
}
.wcr-form-actions {
    text-align: center;
    margin-top: 30px;
}
.wcr-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #f0f0f1;
    border: 1px solid #ccc;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}
.wcr-btn:hover {
    background: #e5e5e5;
    color: #000;
}
.wcr-btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}
.wcr-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}
.wcr-btn-lg {
    padding: 12px 40px;
    font-size: 16px;
}
.wcr-front-actions {
    text-align: center;
    margin-top: 30px;
}
