/* Video Contests and Draw Manager - Frontend Styles */

.vcdm-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: 'DG Agnadeen', 'Cairo', 'Segoe UI', 'Arial Unicode MS', 'Simplified Arabic', 'Droid Sans', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

.vcdm-contest {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vcdm-login-required {
    background: #fff8e5;
    border: 1px solid #ffb81c;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
}

.vcdm-login-required p {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.vcdm-login-required a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 600;
}

.vcdm-login-required a:hover {
    text-decoration: underline;
}

.vcdm-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 20px;
    margin-top: 0;
}

.vcdm-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.vcdm-video-wrapper {
    margin-bottom: 30px;
    background: #000;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
}

.vcdm-video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vcdm-video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.vcdm-video-wrapper p {
    color: #999;
}

.vcdm-form-wrapper {
    margin-top: 30px;
}

.vcdm-form-wrapper h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.vcdm-question {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-left: 3px solid #0073aa;
    border-radius: 4px;
}

.vcdm-question label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.vcdm-question input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.vcdm-question input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 3px rgba(0, 115, 170, 0.3);
}

.vcdm-participant-info {
    margin-top: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 6px;
}

.vcdm-participant-info h4 {
    margin-top: 0;
    color: #333;
}

.vcdm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.vcdm-form-row:last-child {
    margin-bottom: 0;
}

.vcdm-form-col label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.vcdm-form-col input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.vcdm-form-col input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 3px rgba(0, 115, 170, 0.3);
}

.required {
    color: #d9534f;
}

.vcdm-form-actions {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.vcdm-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vcdm-btn-primary {
    background: #0073aa;
    color: white;
}

.vcdm-btn-primary:hover {
    background: #005a87;
    box-shadow: 0 2px 6px rgba(0, 115, 170, 0.3);
}

.vcdm-btn-primary:active {
    background: #004578;
}

.vcdm-loading {
    padding: 20px;
    background: #e8f4f8;
    border: 1px solid #0073aa;
    border-radius: 4px;
    color: #0073aa;
    text-align: center;
    margin-top: 20px;
}

.vcdm-message {
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    font-weight: 500;
}

.vcdm-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.vcdm-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.vcdm-already-entered {
    padding: 20px;
    background: #e8f4f8;
    border: 1px solid #0073aa;
    border-radius: 6px;
    color: #004578;
}

.vcdm-already-entered p {
    margin: 0;
    font-weight: 500;
}

.vcdm-winners-container {
    margin-top: 30px;
}


/* Withdraw (draw) admin section */

.vcdm-withdraw-section.vcdm-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 16px;
    margin-bottom: 18px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f5fbff 0%, #ffffff 100%);
    border: 1px solid rgba(0, 115, 170, 0.08);
    box-shadow: 0 6px 18px rgba(2, 74, 120, 0.04);
}

.vcdm-withdraw-left {
    display: flex;
    flex-direction: column;
}

.vcdm-withdraw-left strong {
    font-size: 16px;
    color: #083c57;
}

.vcdm-withdraw-status {
    margin: 4px 0 0 0;
    color: #006799;
    font-weight: 600;
}

.vcdm-withdraw-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vcdm-withdraw-info {
    font-size: 14px;
    color: #333;
}

.vcdm-withdraw-btn.vcdm-btn-primary {
    background: linear-gradient(180deg, #0073aa 0%, #005a87 100%);
    padding: 10px 16px;
    border-radius: 6px;
}

.vcdm-withdraw-btn.vcdm-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Modal styles for withdraw confirmation */

.vcdm-modal {
    display: none;
}

.vcdm-modal.open {
    display: block;
}

.vcdm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
}

.vcdm-modal-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    width: 90%;
    max-width: 480px;
    border-radius: 8px;
    z-index: 1001;
    box-shadow: 0 8px 30px rgba(2, 74, 120, 0.12);
}

.vcdm-modal-dialog h3 {
    margin-top: 0;
    color: #083c57;
}

.vcdm-modal-body {
    margin: 12px 0;
    color: #333;
}

.vcdm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.vcdm-modal-candidate strong {
    font-size: 16px;
}


/* Withdraw inline info styles */

.vcdm-withdraw-info.error {
    color: #c0392b;
    font-weight: 600;
}

.vcdm-withdraw-info.success {
    color: #155724;
    font-weight: 600;
}

.vcdm-modal-error {
    margin-top: 10px;
    color: #c0392b;
    font-weight: 600;
}

.vcdm-winners-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.vcdm-tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    top: 2px;
}

.vcdm-tab-btn:hover {
    color: #333;
}

.vcdm-tab-btn.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.vcdm-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.vcdm-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.vcdm-winners-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.vcdm-winner-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vcdm-winner-name {
    fontweight: 600;
    color: #333;
}

.vcdm-winner-badge {
    padding: 3px 10px;
    background: #0073aa;
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}


/* Multi-choice questions styles */

.vcdm-choices-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.vcdm-choice-label {
    display: block;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
}

.vcdm-choice-label:hover {
    background: #f9f9f9;
    border-color: #0073aa;
}

.vcdm-choice-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.vcdm-choice-label input[type="radio"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}


/* Responsive */

@media (max-width: 768px) {
    .vcdm-form-row {
        grid-template-columns: 1fr;
    }
    .vcdm-contest {
        padding: 20px;
    }
    .vcdm-title {
        font-size: 22px;
    }
    .vcdm-form-actions {
        flex-direction: column;
    }
    .vcdm-btn {
        width: 100%;
    }
}


/* Auth UI (login/register) */

.vcdm-auth-ui {
    max-width: 760px;
    margin: 0 auto;
    font-family: 'DGAgnadeen', 'Cairo', 'Segoe UI', 'Arial Unicode MS', 'Simplified Arabic', 'Droid Sans', sans-serif;
    padding: 20px;
}

.vcdm-auth-ui p {
    margin-bottom: 0px;
    margin-block-end: 0px !important;
}

.vcdm-auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e0e0e0;
}

.vcdm-tab {
    flex: 1;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: #666;
    cursor: pointer;
    text-align: center;
    border-radius: 0;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    top: 2px;
}

.vcdm-tab:hover {
    color: #333;
    background: rgba(0, 115, 170, 0.05);
}

.vcdm-tab-active {
    background: transparent;
    color: #0073aa;
    border-bottom-color: #0073aa;
    border-color: transparent;
}

.vcdm-auth-panels {
    border: 1px solid #e6e6e6;
    padding: 28px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.vcdm-panel {
    display: block;
    font-family: 'DG Agnadeen', 'Cairo', 'Segoe UI', 'Arial Unicode MS', 'Simplified Arabic', 'Droid Sans', sans-serif;
}

.vcdm-panel .vcdm-field {
    margin-bottom: 18px;
}

.vcdm-panel .vcdm-field:last-child {
    margin-bottom: 0;
}

.vcdm-panel label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.vcdm-panel label .required {
    color: #d9534f;
    margin-left: 3px;
}

.vcdm-panel input[type="text"],
.vcdm-panel input[type="email"],
.vcdm-panel input[type="password"],
.vcdm-panel input[type="tel"] {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #dcdcdc;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #fafafa;
}

.vcdm-panel input[type="text"]:focus,
.vcdm-panel input[type="email"]:focus,
.vcdm-panel input[type="password"]:focus,
.vcdm-panel input[type="tel"]:focus {
    outline: none;
    background: #fff;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.vcdm-panel input[type="text"]:disabled,
.vcdm-panel input[type="email"]:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

.vcdm-btn {
    background: #0073aa;
    color: #fff;
    border: 0;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    width: 100%;
}

.vcdm-btn:hover {
    background: #005a87;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
}

.vcdm-btn:active {
    background: #004578;
}

.vcdm-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.vcdm-switch-link {
    background: transparent;
    border: 0;
    color: #0073aa;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    font-weight: 600;
    font-size: 14px;
}

.vcdm-switch-link:hover {
    text-decoration: underline;
}

.vcdm-panel .vcdm-message {
    margin-top: 0;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 5px;
    font-size: 13px;
}

.vcdm-panel .vcdm-btn,
.vcdm-panel button[type="submit"],
.vcdm-panel #wp-submit {
    background: #111424;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    display: block;
    box-sizing: border-box;
}

.vcdm-panel input[type="submit"] {
    background: #111424;
    color: #fff;
    border: none;
    padding: 14px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    display: block;
    box-sizing: border-box;
}

.vcdm-panel .vcdm-btn:hover,
.vcdm-panel button[type="submit"]:hover,
.vcdm-panel #wp-submit:hover,
.vcdm-panel input[type="submit"]:hover {
    background: #efa765;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.3);
    transform: translateY(-2px);
}

.vcdm-panel .vcdm-btn:active,
.vcdm-panel button[type="submit"]:active,
.vcdm-panel #wp-submit:active,
.vcdm-panel input[type="submit"]:active {
    background: #111424;
    transform: translateY(0);
}

.vcdm-panel .vcdm-btn:disabled,
.vcdm-panel button[type="submit"]:disabled,
.vcdm-panel #wp-submit:disabled,
.vcdm-panel input[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 600px) {
    .vcdm-auth-ui {
        padding: 15px;
    }
    .vcdm-auth-panels {
        padding: 20px;
    }
    .vcdm-btn {
        padding: 10px 16px;
    }
}