/* Ant Threat Dial Styles */

.ant-dial-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 20px auto;
    max-width: 400px;
}

.ant-dial-svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    display: block;
}

.ant-dial-title {
    font-family: "Chewy", system-ui;
    font-size: 24px;
    color: #A06638;
    margin-bottom: 10px;
    text-align: center;
}

.ant-dial-subtitle {
    font-family: "Chewy", system-ui;
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    text-align: center;
}

/* Arc styles */
.ant-dial-arc {
    stroke-linecap: round;
}

/* Needle styles */
.ant-dial-needle {
    transition: none;
}

.ant-dial-svg {
    cursor: default;
}

.ant-dial-interactive {
    cursor: grab;
}

.ant-dial-interactive:active {
    cursor: grabbing;
}

.needle-hub {
    cursor: inherit;
}

/* Labels */
.ant-dial-label {
    font-family: "Chewy", system-ui;
    font-size: 12px;
    fill: #666;
    user-select: none;
}

.ant-dial-value-label {
    font-family: "Chewy", system-ui;
    user-select: none;
}

/* Percentage display - large and prominent */
.ant-dial-percentage {
    font-family: "Chewy", system-ui;
    user-select: none;
}

/* Phrase display - smaller, italicized */
.ant-dial-phrase {
    font-family: "Chewy", system-ui;
    user-select: none;
}

/* Timestamp display - small, subtle */
.ant-dial-timestamp {
    font-family: "Chewy", system-ui;
    user-select: none;
    opacity: 0.7;
}

/* External phrase display - bigger, outside SVG */
.ant-dial-phrase-external {
    font-family: "Chewy", system-ui;
    font-size: 18px;
    font-style: italic;
    color: #666;
    text-align: center;
    margin: 10px auto 20px;
    max-width: 600px;
}

/* External percentage display - outside SVG, controllable with CSS */
.ant-dial-percentage-external {
    font-family: "Chewy", system-ui;
    font-size: 48px;
    font-weight: bold;
    text-align: center;
    margin: 20px auto 10px;
    /* Color will be set dynamically via JavaScript */
}

/* Admin specific styles */
.ant-dial-admin {
    border: 2px solid #E28B4B;
    border-radius: 10px;
    background: white;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 20px auto;
}

.ant-dial-admin .ant-dial-title {
    color: #E28B4B;
    margin-bottom: 20px;
}

/* Success/Error messages */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    text-align: center;
}

/* Responsive styles */
@media (max-width: 640px) {
    .ant-dial-container {
        margin: 30px auto;
        padding: 15px;
    }

    .ant-dial-title {
        font-size: 20px;
    }

    .ant-dial-subtitle {
        font-size: 12px;
    }

    .ant-dial-admin {
        padding: 20px;
        margin: 15px auto;
    }
}

@media (max-width: 480px) {
    .ant-dial-container {
        padding: 10px;
    }

    .ant-dial-title {
        font-size: 18px;
    }
}

/* Hover animations for public display */
.ant-dial-container:hover .ant-dial-svg {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(226, 139, 75, 0.4));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.ant-dial-container:hover .ant-dial-title {
    color: #E28B4B;
    transition: color 0.3s ease;
}

/* Needle bounce animation on hover */
@keyframes needleBounce {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    50% { transform: translateX(3px); }
    75% { transform: translateX(-2px); }
}

.ant-dial-container:hover .ant-dial-needle {
    animation: needleBounce 0.6s ease-in-out;
}

/* No animation for value label - keep text static */

/* Ensure percentage and phrases don't animate on hover */
.ant-dial-container:hover .ant-dial-percentage,
.ant-dial-container:hover .ant-dial-phrase {
    /* No animation - keep static */
}

/* Arc segments color intensify on hover */
.ant-dial-container:hover path {
    filter: brightness(1.2);
    transition: filter 0.3s ease;
}

/* Center hub glow */
.ant-dial-container:hover .needle-hub {
    filter: drop-shadow(0 0 8px rgba(51, 51, 51, 0.6));
    transition: filter 0.3s ease;
}

/* Smooth transitions when not hovering */
.ant-dial-svg,
.ant-dial-title,
.ant-dial-needle,
.ant-dial-container path,
.needle-hub {
    transition: all 0.3s ease;
}
