/* style.css */
/* This file contains consolidated and enhanced styles for the Polls application, supporting LTR and RTL layouts. */
/* IMPORTANT: All custom styles are properly scoped to avoid Bootstrap conflicts using specific class selectors */

/* Mobile-First Responsive Design */
@media (max-width: 576px) {
    .container.main-container {
        max-width: 100%;
        margin-top: 1rem;
        margin-bottom: 1rem;
        padding-left: 15px;
        padding-right: 15px;
    }

    .hero-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p.lead {
        font-size: 1rem;
    }

    .btn {
        min-height: 44px;
        /* Touch target size */
        padding: 12px 16px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .form-control {
        min-height: 44px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .card {
        margin-bottom: 1rem;
    }

    .feature-card .card-body {
        padding: 1.5rem;
    }
}

/* Tablet and larger screens */
@media (min-width: 577px) {
    .container.main-container {
        max-width: 576px;
    }
}

/* Touch-friendly improvements */
.btn,
.form-control,
.form-check-input,
.card {
    -webkit-tap-highlight-color: transparent;
}

/* Focus improvements for accessibility - scoped to avoid Bootstrap conflicts */
.poll-form .btn:focus,
.poll-form .form-control:focus,
.poll-form .form-check-input:focus,
.custom-focus:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Remove conflicting utility classes that duplicate Bootstrap */
.border {
    border: 1px solid #dee2e6 !important;
    /* Restore Bootstrap default */
}

/* Better form spacing on mobile */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-check {
        margin-bottom: 1rem;
    }

    .input-group-text {
        min-height: 44px;
    }
}

/* Improve readability on small screens */
@media (max-width: 576px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        line-height: 1.3;
    }

    p {
        margin-bottom: 1rem;
    }
}

/* Better button groups on mobile */
@media (max-width: 576px) {
    .btn-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-group .btn {
        border-radius: 0.375rem !important;
        margin: 0;
    }
}

/* Navbar mobile improvements */
@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .navbar-brand img {
        width: 40px;
        height: 40px;
    }
}

/* Card hover effects for touch devices */
@media (hover: hover) {
    .feature-card:hover {
        transform: translateY(-5px);
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Base Body and Typography */
body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    /* Light background for the whole page */
    /* Conditional font-family based on direction - handled by inline style in index.php */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: #212529;
}

/* Layout */
.container.main-container {
    max-width: 576px;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.card {
    box-shadow: 0 4px 6px rgba(10, 10, 10, 0.1);
    margin-bottom: 1.5rem;
}

/* Header/Navbar - Properly scoped to avoid Bootstrap conflicts */
.poll-navbar .navbar {
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .05);
}

.poll-navbar .navbar-brand {
    font-weight: 700;
}

.poll-navbar .navbar-brand img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

html[dir="rtl"] .poll-navbar .navbar-brand img {
    margin-right: 0;
    margin-left: 10px;
}

/* Language Switcher */
.language-switcher {
    margin-bottom: 1.5rem;
    text-align: right;
}

html[dir="rtl"] .language-switcher,
.rtl .language-switcher {
    text-align: left;
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(to right, #e0f7fa, #bbdefb);
    padding-top: 7rem;
    padding-bottom: 7rem;
    color: #333;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png') repeat;
    opacity: 0.1;
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: #004d40;
    margin-bottom: 1rem;
}

.hero-section p.lead {
    font-size: 1.25rem;
    color: #212121;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-section img {
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

/* Buttons - Properly scoped to avoid Bootstrap conflicts */
.btn.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
}

.btn.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn.btn-info {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn.btn-info:hover {
    background-color: #117a8b;
    border-color: #117a8b;
}

/* Feature Cards - Properly scoped to avoid Bootstrap conflicts */
.poll-cards .card.feature-card {
    background-color: #fff;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.poll-cards .card.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.poll-cards .card.feature-card .card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.poll-cards .card.feature-card .card-title {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.poll-cards .card.feature-card .card-body i {
    color: var(--bs-primary);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

/* Important Notice Section - Properly scoped */
.poll-notice .alert-warning-subtle {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 1.5rem;
    border-radius: .5rem;
}

.poll-notice .alert.alert-warning {
    border-color: #ffc107;
}

.poll-notice .alert-heading {
    color: #856404;
}

.poll-notice .alert i {
    font-size: 2.5rem;
    line-height: 1;
    margin-top: 5px;
}

.poll-notice .alert.alert-warning .fa-exclamation-triangle {
    color: #ffc107 !important;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
}

footer a {
    color: #007bff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

footer .aldayel {
    color: #007bff;
    font-weight: bold;
}

/* Form Typography */
.form-text {
    font-style: italic;
}

/* CAPTCHA */
.captcha-container {
    display: flex;
}

.captcha-image {
    background-color: #dbdbdb;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    letter-spacing: 2px;
    user-select: none;
}

.captcha-error-message {
    color: #dc3545;
    font-size: 0.95rem;
    margin-top: 0.35rem;
    margin-bottom: 0;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    font-weight: 500;
    line-height: 1.4;
    display: block;
    animation: fadeInCaptchaError 0.35s ease;
}

@keyframes fadeInCaptchaError {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Poll Options */
#poll-options-container .form-group {
    margin-bottom: 0.5rem;
}

.remove-option-btn {
    margin-left: 0.5rem;
}

html[dir="rtl"] .remove-option-btn {
    margin-left: 0;
    margin-right: 0.5rem;
}

/* Progressive Loader */
.progressive-loader {
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.2em;
}

/* Image Preview */
#media-preview img {
    max-width: 476px;
    max-height: 200px;
    border: 1px solid gray;
    border-radius: 10px;
    margin: 1rem auto 0 auto;
    display: block;
}

/* Social Embed Container */
.social-embed-container {
    max-width: 576px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    text-align: center;
    min-height: 200px;
}

/* Responsive social embed for small screen */
@media (max-width: 576px) {
    .social-embed-container {
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }
}

/* Embed Responsive - Properly scoped to avoid Bootstrap 5 ratio utility conflicts */
.poll-embed .embed-responsive {
    position: relative;
    /*padding-bottom: 56.25%;  16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
    min-height: fit-content;
}

.poll-embed .embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.poll-embed .embed-responsive.failed {
    padding: 1rem;
    background: #f8f9fa;
    text-align: center;
}

@media (max-width: 576px) {
    .poll-embed .embed-responsive {
        min-height: 200px;
    }
}

.poll-embed .embed-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    z-index: 10;
    color: #666;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poll-embed .embed-fallback {
    display: none;
    padding: 1rem;
    text-align: center;
    background: #f5f5f5;
    border-radius: 4px;
}

.poll-embed .embed-responsive.failed .embed-fallback {
    display: block;
}

/* YouTube Thumbnail Preview */
.youtube-thumbnail-preview {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.youtube-thumbnail-preview img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.youtube-thumbnail-preview:hover img {
    transform: scale(1.03);
}

.youtube-thumbnail-preview .play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 0, 0, 0.8);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    margin-left: 4px;
}

@media (max-width: 576px) {
    .youtube-thumbnail-preview .play-icon {
        width: 50px;
        height: 50px;
    }

    .youtube-thumbnail-preview .play-icon i {
        font-size: 20px;
    }
}

/* LinkedIn Preview Card */
.linkedIn-preview-card {
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    padding: 10px;
    max-width: 600px;
    background-color: #f9f9f9;
}

.linkedIn-preview-card img {
    width: 100px;
    max-height: 100px;
    margin-right: 10px;
}

.linkedIn-preview-card a {
    color: #0077b5;
    font-weight: bold;
    text-decoration: none;
}

.linkedIn-preview-card p {
    margin: 5px 0;
    color: #555;
}

/* Embed Twitter */
.embed-twitter {
    width: 100%;
    min-height: 300px;
}

.embed-twitter iframe {
    width: 100% !important;
    min-height: 300px !important;
    border: none !important;
}

.twitter-tweet {
    margin: 0 auto !important;
}

/* Aspect Ratio Helper - Renamed to avoid Bootstrap 5 ratio utility conflicts */
.poll-ratio {
    position: relative;
    width: 100%;
}

.poll-ratio::before {
    display: block;
    padding-top: 56.25%;
    content: "";
}

.poll-ratio>* {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* D-NONE (utility) - Remove to avoid Bootstrap conflict */
.d-none {
    display: none !important;
    /* Use Bootstrap's d-none instead */
}

/* Form Validation - Scoped to avoid Bootstrap conflicts */
.poll-form .is-invalid {
    border-color: #dc3545;
}

.poll-form .invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.poll-form .is-invalid~.invalid-feedback {
    display: block;
}

/* IRV Results */
.irv-results .round {
    border: 1px solid #dee2e6;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.irv-results .round h4 {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

/* Background Colors (utility) */
.bg-success-light {
    background-color: #d4edda !important;
}

.bg-danger-light {
    background-color: #f8d7da !important;
}

.bg-warning-light {
    background-color: #fff3cd !important;
}

/* Live Preview */
#live-video-preview {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    background: #f9f9f9;
    position: relative;
    min-height: 300px;
}

#live-video-preview .embed-responsive {
    min-height: 300px;
    position: relative;
}

/* Flag Status Icons */
.flag-status {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.flag-open {
    background: #21c77a;
    border: 2px solid #21c77a;
}

.flag-closed {
    background: #f14668;
    border: 2px solid #f14668;
}

.flag-notyet {
    background: orange;
    border: 2px solid orange;
}

/* Border Utility */
.border {
    border: 0 !important;
}

/* Results Area */
#results-area {
    display: block !important;
}

#results-chart {
    width: 100%;
    min-height: fit-content;
}

/* .sortable-list: Consolidated user-select rules and removed duplication */
.sortable-list {
    list-style-type: none;
    padding-left: 0;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* .sortable-ghost: Keep most complete version */
.sortable-ghost {
    opacity: 0.5;
    background: #c8ebfb;
    transform: scale(1.02);
}

/* .sortable-chosen: Keep single definition */
.sortable-chosen {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #f8f9fa;
    transform: scale(1.02);
    /* Adds the scaling effect */
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    /* Optional: smooths the effect */
}

/* .sortable-drag (unique) */
.sortable-drag {
    z-index: 9999 !important;
}

/* .sortable-fallback */
.sortable-fallback {
    opacity: 0.7 !important;
    background-color: #c8ebfb !important;
    cursor: grabbing !important;
}

/* .option-text */
.option-text {
    flex-grow: 1;
    word-break: break-word;
    min-width: 0;
}

/* Responsive Draggable Item Styling */
.draggable-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow: hidden;
    touch-action: manipulation;
    /* allow vertical scroll if not dragging */
}

.drag-handle {
    flex-shrink: 0;
    cursor: grab;
    padding: 12px 15px;
    margin-right: 15px;
    color: #6c757d;
    -webkit-tap-highlight-color: transparent;
    font-size: 2em;
    min-width: 44px;
    /* Apple recommends at least 44x44 points for touch targets */
    min-height: 44px;
}

.draggable-item:active .drag-handle,
.draggable-item.sortable-chosen .drag-handle {
    cursor: grabbing;
}

/* Enhanced mobile touch handling and responsive draggable item styling */
@media (max-width: 768px) {
    .draggable-item {
        padding: 15px;
        margin-bottom: 12px;
    }

    .drag-handle {
        padding: 20px;
        font-size: 2em;
        text-align: center;
    }

    .sortable-ghost {
        opacity: 0.5;
        background: #c8ebfb;
        transform: scale(1.02);
    }
}

/* Enhanced mobile touch handling */
@media (pointer: coarse) {
    .draggable-item {
        padding: 15px;
        min-height: 60px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .drag-handle {
        padding: 15px;
        font-size: 1.8em;
        color: #666;
    }


    /* Larger touch targets */
    .sortable-list {
        padding: 8px;
    }

    .sortable-list .draggable-item {
        margin-bottom: 12px;
    }
}

/* Accessibility: Focus Outlines - Properly scoped */
.poll-content a:focus,
.poll-content button:focus,
.poll-content input:focus,
.poll-content select:focus,
.poll-content textarea:focus,
.poll-content .form-check-input:focus,
.poll-content .remove-option-btn:focus {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #bbdefb;
    z-index: 2;
    position: relative;
}

.poll-content input:focus:invalid {
    outline: 2px solid #dc3545;
    box-shadow: 0 0 0 2px #f8d7da;
}

/* High-Contrast Theme (TOGGLE via .high-contrast on body) */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast .card,
body.high-contrast .social-embed-container,
body.high-contrast #live-video-preview,
body.high-contrast .embed-responsive,
body.high-contrast .progressive-loader,
body.high-contrast .form-control,
body.high-contrast .input-group-text,
body.high-contrast .btn,
body.high-contrast .table,
body.high-contrast .alert,
body.high-contrast .sortable-list .draggable-item {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

body.high-contrast .btn-primary,
body.high-contrast .btn-outline-primary,
body.high-contrast .btn-secondary,
body.high-contrast .btn-outline-secondary {
    background-color: #fff !important;
    color: #000 !important;
    border-color: #fff !important;
}

body.high-contrast .bg-success-light,
body.high-contrast .bg-danger-light,
body.high-contrast .bg-warning-light,
body.high-contrast .alert-success,
body.high-contrast .alert-danger,
body.high-contrast .alert-warning,
body.high-contrast .alert-info {
    background-color: #111 !important;
    color: #ffd600 !important;
    border-color: #ffd600 !important;
}

body.high-contrast .form-control:focus,
body.high-contrast input:focus,
body.high-contrast select:focus,
body.high-contrast textarea:focus {
    outline: 2px solid #ffd600 !important;
    box-shadow: 0 0 0 2px #ffd600 !important;
    color: #111;
    background: #fff !important;
}

body.high-contrast .is-invalid,
body.high-contrast .invalid-feedback {
    color: #ff5252 !important;
    border-color: #ff5252 !important;
}

body.high-contrast .form-control {
    background: #000 !important;
    color: #fff !important;
}

.awesomplete {
    display: block;
}

.copy-link-btn {
    pointer-events: auto;
}

.copy-link-btn.copied {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.copy-link-btn.copied i::before {
    content: "\f00c";
}

/* Sankey Diagram (if used) */
#sankey-diagram-container {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin-bottom: 30px;
}

html[dir="rtl"] #sankey-diagram-container .echarts {
    direction: ltr;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p.lead {
        font-size: 1rem;
    }

    .feature-card .card-body i {
        font-size: 2.5rem;
    }

    .alert i {
        font-size: 2rem;
    }

    .hero-section img {
        max-height: 180px;
    }

    #sankey-diagram-container {
        height: 400px;
    }
}

@media (max-width: 576px) {
    #sankey-diagram-container {
        height: 300px;
        padding: 10px;
    }
}

/* RTL Overrides - Specific adjustments for right-to-left layout */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Kufi Arabic', sans-serif;
}

html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] .form-check-label,
html[dir="rtl"] .form-text,
html[dir="rtl"] .invalid-feedback {
    text-align: right;
}

html[dir="rtl"] .form-check-input {
    margin-left: 0.5em;
    margin-right: -1.5em;
    float: right;
}

html[dir="rtl"] .form-check {
    padding-right: 1.5em;
    padding-left: 0;
}

html[dir="rtl"] .col-auto {
    width: -webkit-fill-available;
}

html[dir="rtl"] .input-group-text i {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .embed-loading .spinner-border {
    margin-left: 0.5rem;
    margin-right: 0;
}

html[dir="rtl"] .row.g-3.align-items-end {
    flex-direction: row-reverse;
}

html[dir="rtl"] .btn i {
    margin-left: 0.25rem;
    margin-right: 0;
}

/* RTL spacing utilities (ensure these are correctly applied for RTL) */
html[dir="rtl"] .me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .ms-1 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

html[dir="rtl"] .pe-1 {
    padding-left: 0.25rem !important;
    padding-right: 0 !important;
}

html[dir="rtl"] .pe-2 {
    padding-left: 0.5rem !important;
    padding-right: 0 !important;
}

html[dir="rtl"] .pe-3 {
    padding-left: 1rem !important;
    padding-right: 0 !important;
}

html[dir="rtl"] .ps-1 {
    padding-right: 0.25rem !important;
    padding-left: 0 !important;
}

html[dir="rtl"] .ps-2 {
    padding-right: 0.5rem !important;
    padding-left: 0 !important;
}

html[dir="rtl"] .ps-3 {
    padding-right: 1rem !important;
    padding-left: 0 !important;
}

/* Consolidated Font Awesome icon spacing for both LTR/RTL */
.fa-language.me-1,
.fa-user-shield.me-1,
.fa-plus-circle.me-2,
html[dir="rtl"] .fa-language.me-1,
html[dir="rtl"] .fa-user-shield.me-1,
html[dir="rtl"] .fa-plus-circle.me-2 {
    margin-right: 0.25rem;
    margin-left: 0.25rem;
}

.transition-all {
    transition: opacity 0.3s ease;
}

/* Provides visual feedback for the original item being dragged on touch devices */
.draggable-item.is-dragging {
    opacity: 0.5;
    background: #e9ecef;
}

.timezone-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid #ccc;
    font-size: 0.70rem;
    font-weight: 500;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Left side: Label */
.timezone-label {
    padding: 0.5em 0.9em;
    background-color: #d6d8db;
    /* gray tone */
    color: #333;
    white-space: nowrap;
    position: relative;
}

/* Right side: Value */
.timezone-value {
    padding: 0.5em 1em;
    background-color: #f8f9fa;
    /* light tone */
    color: #000;
    white-space: nowrap;
    position: relative;
}

/* Diagonal divider using pseudo-element */
.timezone-label::after {
    content: "";
    position: absolute;
    top: 0;
    right: -1px;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom left, transparent 49%, #ccc 50%, transparent 51%);
    transform: skewX(-20deg);
}

/* HoneyPot - Visually Hidden */
.visually-hidden-special {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Additional styles from index.php */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --secondary-color: #17a2b8;
    --secondary-hover: #117a8b;
    --hero-gradient-start: #e0f7fa;
    --hero-gradient-end: #bbdefb;
    --hero-text-color: #004d40;
    --transition-speed: 0.3s;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
    pointer-events: none;
}

.hero-section h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--hero-text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section p.lead {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #212121;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.hero-section img {
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Buttons */
.btn {
    transition: all var(--transition-speed) ease;
    font-weight: 500;
    border-radius: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-info {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-info:hover,
.btn-info:focus {
    background-color: var(--secondary-hover);
    border-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* Feature Cards */
.feature-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
    background: white;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.feature-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2.5rem 2rem;
}

.feature-card .icon-box i {
    color: var(--primary-color);
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    transition: transform var(--transition-speed) ease;
}

.feature-card:hover .icon-box i {
    transform: scale(1.1);
}

.feature-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #212529;
}

.feature-card .card-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Alert/Notice Section */
.alert-warning {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    border-radius: 8px;
    padding: 1.5rem;
}

.alert i {
    font-size: 2.5rem;
    line-height: 1;
}

.alert-heading {
    color: #856404;
    font-weight: 600;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
}

html[dir="rtl"] .navbar-brand img {
    margin-right: 0;
    margin-left: 10px;
}

/* Footer */
footer {
    background-color: #f8f9fa;
    padding: 2.5rem 0;
    border-top: 1px solid #e9ecef;
}

footer .aldayel {
    color: var(--primary-color);
    font-weight: 600;
}

footer a {
    transition: color var(--transition-speed) ease;
}

footer a:hover {
    color: var(--primary-hover) !important;
}

/* Accessibility Improvements */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}