.admin-timer-container {
    background: transparent;
    padding: 20px;
    margin: 20px 0;
    border-radius: 10px;
    max-width: 600px;
}

.admin-timer {
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.admin-timer .timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    position: relative;
    z-index: 2;
    clear: both;
}

.admin-timer .digit-container {
    perspective: 1000px;
    width: 60px;
    height: 90px;
}

.admin-timer .digit-card {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(51, 51, 51, 0.8);
    border-radius: 8px;
    box-shadow: 
        0 0 10px rgba(0,0,0,0.3),
        inset 0 0 10px rgba(0,0,0,0.2);
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-timer .digit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.2) 0%, 
        rgba(255,255,255,0.05) 100%);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.admin-timer .digit-card::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 2px;
    background: rgba(0,0,0,0.3);
    box-shadow: 0 1px 0 rgba(255,255,255,0.1);
}

.admin-timer .digit {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
    color: #fff;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.admin-timer .separator {
    font-size: 40px;
    color: #666;
    margin: 0 5px;
    animation: blink 1s step-end infinite;
}

.admin-timer .timer-status {
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 15px;
    margin-bottom: 0;
    color: #666;
    position: relative;
    z-index: 1;
    clear: both;
    text-align: center;
    display: block;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    overflow: visible;
    white-space: nowrap;
}

/* Warning state (last 30 seconds) */
.admin-timer.warning .digit {
    color: #ffcc00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.admin-timer.warning .digit-card {
    box-shadow: 
        0 0 20px rgba(255, 204, 0, 0.3),
        inset 0 0 10px rgba(255, 204, 0, 0.2);
}

/* Critical state (last 10 seconds) */
.admin-timer.critical .digit {
    color: #ff0000;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    animation: pulse 1s infinite;
}

.admin-timer.critical .digit-card {
    box-shadow: 
        0 0 20px rgba(255, 0, 0, 0.3),
        inset 0 0 10px rgba(255, 0, 0, 0.2);
}

/* Prevent any absolute positioning or transforms on timer status */
.admin-timer .timer-status,
.countdown-clock-frontend-admin .timer-status {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    font-size: 16px !important;
    text-align: center !important;
    display: block !important;
    margin: 15px auto 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes blink {
    50% { opacity: 0; }
}

.timer-controls {
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    max-width: 600px;
}

.timer-controls h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.timer-controls button {
    margin: 0 10px 10px 0;
    padding: 8px 16px;
    font-size: 14px;
    line-height: 2;
    min-height: 30px;
    border-radius: 4px;
    cursor: pointer;
}

#start-timer {
    background-color: #46b450;
    border-color: #46b450;
    color: #fff;
}

#start-timer:hover {
    background-color: #3d9c46;
    border-color: #3d9c46;
}

#reset-timer {
    background-color: #f0b849;
    border-color: #f0b849;
    color: #fff;
}

#reset-timer:hover {
    background-color: #e6a534;
    border-color: #e6a534;
}

#stop-timer {
    background-color: #dc3232;
    border-color: #dc3232;
    color: #fff;
}

#stop-timer:hover {
    background-color: #c62828;
    border-color: #c62828;
}

.form-table {
    margin: 20px 0;
    max-width: 600px;
}

.form-table input[type="number"] {
    width: 80px;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #7e8993;
}

.shortcode-info {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    max-width: 600px;
}

.shortcode-info h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.shortcode-info code {
    display: inline-block;
    padding: 5px 10px;
    background: #f0f0f1;
    border-radius: 3px;
    font-size: 13px;
}

/* Frontend admin wrapper */
.countdown-clock-frontend-admin {
    padding: 20px;
    background: #f0f0f1;
    border-radius: 8px;
    margin: 20px 0;
    position: relative;
    z-index: 100;
    isolation: isolate;
}

/* Override any Elementor or theme CSS that might be causing overlays */
.elementor-widget-container .countdown-clock-frontend-admin,
.elementor-shortcode .countdown-clock-frontend-admin {
    position: relative !important;
    z-index: 100 !important;
    overflow: visible !important;
}

.elementor-widget-container .countdown-clock-frontend-admin .timer-status,
.elementor-shortcode .countdown-clock-frontend-admin .timer-status {
    position: relative !important;
    transform: none !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    font-size: 16px !important;
    text-align: center !important;
    display: block !important;
    margin: 15px auto 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
}

/* Remove any pseudo-elements that might be causing overlays */
.countdown-clock-frontend-admin .timer-status::before,
.countdown-clock-frontend-admin .timer-status::after,
.admin-timer .timer-status::before,
.admin-timer .timer-status::after {
    display: none !important;
    content: none !important;
}

/* Ensure no animations are causing positioning issues */
.countdown-clock-frontend-admin .timer-status,
.admin-timer .timer-status {
    animation: none !important;
    transition: none !important;
}

/* Hide any regular debate timer that might be on the same page */
.countdown-clock-frontend-admin ~ .debate-timer-container,
.countdown-clock-frontend-admin ~ .debate-timer,
.debate-timer-container:not(.admin-timer-container),
.debate-timer:not(.admin-timer) {
    display: none !important;
}

/* Ensure only admin timer shows when admin shortcode is present */
body:has(.countdown-clock-frontend-admin) .debate-timer-container:not(.admin-timer-container),
body:has(.countdown-clock-frontend-admin) .debate-timer:not(.admin-timer) {
    display: none !important;
}

/* Ensure no overlapping text */
.countdown-clock-frontend-admin * {
    box-sizing: border-box;
}

.countdown-clock-frontend-admin .admin-timer-container {
    position: relative;
    z-index: 1;
    overflow: visible;
}

.countdown-clock-frontend-admin .admin-timer {
    position: relative;
    z-index: 1;
    background: transparent;
    overflow: visible;
}

/* Ensure admin timer container is properly contained */
.countdown-clock-frontend-admin .admin-timer-container {
    position: relative;
    z-index: 1;
    overflow: visible;
    background: transparent;
    max-width: 600px;
    margin: 0 auto;
}

.countdown-clock-frontend-admin .timer-status {
    position: relative;
    z-index: 10;
    display: block;
    width: 100%;
    margin-top: 15px;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
}

/* Prevent any text overlays on timer display */
.countdown-clock-frontend-admin .admin-timer .timer-display,
.countdown-clock-frontend-admin .admin-timer .digit-container,
.countdown-clock-frontend-admin .admin-timer .digit-card,
.countdown-clock-frontend-admin .admin-timer .digit {
    position: relative;
    z-index: 5;
}

/* Ensure timer status is properly contained */
.countdown-clock-frontend-admin .admin-timer .timer-status {
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    width: 100% !important;
    margin-top: 15px !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-align: center !important;
    font-size: 16px !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    color: #666 !important;
    clear: both !important;
    float: none !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

.countdown-clock-frontend-admin h1 {
    color: #1d2327;
    font-size: 23px;
    font-weight: 400;
    margin: 0 0 20px 0;
    padding: 9px 0;
    line-height: 1.3;
}

.countdown-clock-frontend-admin h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.countdown-clock-frontend-admin .notice {
    background: #fff;
    border-left: 4px solid #00a32a;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin: 5px 0 15px;
    padding: 1px 12px;
}

.countdown-clock-frontend-admin .notice-success {
    border-left-color: #00a32a;
}

.countdown-clock-frontend-admin .notice p {
    margin: 0.5em 0;
    padding: 2px;
    color: #1d2327;
}

.countdown-clock-frontend-admin .button {
    display: inline-block;
    text-decoration: none;
    font-size: 13px;
    line-height: 2.15384615;
    min-height: 30px;
    margin: 0;
    padding: 0 10px;
    cursor: pointer;
    border: 1px solid #2271b1;
    border-radius: 3px;
    background: #2271b1;
    color: #fff;
    text-align: center;
    vertical-align: top;
    white-space: nowrap;
}

.countdown-clock-frontend-admin .button:hover {
    background: #135e96;
    border-color: #135e96;
}

.countdown-clock-frontend-admin .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.countdown-clock-frontend-admin .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

.countdown-clock-frontend-admin .form-table th {
    text-align: left;
    padding: 20px 10px 20px 0;
    width: 200px;
    vertical-align: middle;
    font-weight: 600;
    color: #1d2327;
}

.countdown-clock-frontend-admin .form-table td {
    padding: 15px 10px;
    vertical-align: middle;
}

.countdown-clock-frontend-admin .submit {
    padding: 0;
    margin: 0 0 20px;
} 