/* Custom Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    height: 1.25rem;
    width: 1.25rem;
    background-color: var(--input-bg-color);
    border: 1px solid var(--sidebar-border-color);
    border-radius: 0.25rem;
    display: inline-block;
    position: relative;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #D946EF; /* pink-500 */
    border-color: #D946EF;
}

input[type="checkbox"]:checked::after {
    content: '\2713'; /* Checkmark character */
    font-size: 1rem;
    color: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.main-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--sidebar-border-color);
    margin-bottom: 0.75rem;
}

.input-field {
    background-color: var(--input-bg-color);
    border-color: var(--sidebar-border-color);
    color: var(--text-color);
}

.accent-bg {
    background-image: linear-gradient(to right, #D946EF, #F472B6);
    transition: all 0.3s ease;
}

.accent-bg:hover {
    box-shadow: 0 0 20px rgba(230, 128, 215, 0.6);
    filter: brightness(1.1);
}

/* Progress bar inner styling */
.progress-bar-inner {
    background-image: linear-gradient(to right, #D946EF, #F472B6);
    transition: width 0.2s ease;
}

/* Modern Toggle Switch */
input[type="checkbox"].toggle-checkbox {
    display: none; /* Hide the default checkbox */
}

.toggle-label {
    display: block;
    overflow: hidden;
    cursor: pointer;
    width: 48px;
    height: 24px;
    background-color: #4a5568; /* gray-600 */
    border-radius: 9999px;
    position: relative;
    transition: background-color 0.2s ease-in-out;
}

.toggle-label:before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    background: white;
    position: absolute;
    top: 2px;
    left: 2px;
    border-radius: 9999px;
    transition: left 0.2s ease-in-out;
}

.toggle-checkbox:checked + .toggle-label {
    background-color: #D946EF; /* pink-500 */
}

.toggle-checkbox:checked + .toggle-label:before {
    left: calc(100% - 2px);
    transform: translateX(-100%);
}

/* Action Buttons in Tables */
.action-btn {
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* Responsive Table for Video List */
@media screen and (max-width: 768px) {
    .overflow-x-auto {
        overflow-x: hidden;
    }

    table.min-w-full {
        min-width: 100%;
    }

    table.min-w-full thead {
        display: none; /* Hide table headers on mobile */
    }

    table.min-w-full tr {
        display: block;
        border-radius: 0.5rem;
        margin-bottom: 1rem;
        border: 1px solid #4a5568; /* gray-600 */
        background-color: #2d3748; /* gray-800 */
    }

    table.min-w-full td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 1rem;
        text-align: right;
        border-bottom: 1px solid #4a5568; /* gray-700 */
    }

    table.min-w-full td:last-child {
        border-bottom: 0;
    }

    table.min-w-full td[data-label]:before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        color: #a0aec0; /* gray-400 */
    }

    /* Specific adjustments */
    table.min-w-full td[data-label="Select"] {
        display: none; /* Hide checkbox row on mobile, selection can be done on desktop */
    }

    table.min-w-full td[data-label="Video"] {
        display: block;
        padding: 1rem;
        font-size: 1.125rem;
    }

    table.min-w-full td[data-label="Video"]:before {
        display: none;
    }

    table.min-w-full td[data-label="Actions"] .flex {
        width: 100%;
        justify-content: space-around; /* Space out actions evenly */
    }

    #bulk-copy, #bulk-delete {
        display: none;
    }
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: scale(1.05);
}

.btn-gradient-primary {
    color: white;
    background-image: linear-gradient(to right, #D946EF, #F472B6);
    background-size: 200% auto;
}

.btn-gradient-primary:hover {
    background-position: right center;
    box-shadow: 0 0 20px rgba(230, 128, 215, 0.6);
    filter: brightness(1.1);
}

.btn-gradient-secondary {
    color: white;
    background-image: linear-gradient(to right, #3b82f6, #6366f1);
    background-size: 200% auto;
}

.btn-gradient-secondary:hover {
    background-position: right center;
}

.aspect-9-16 {
    aspect-ratio: 9 / 16;
}

/* Custom File Input Button */
.file-input::file-selector-button {
    background-image: linear-gradient(to right, #D946EF, #c026d3);
    border: 0;
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: white;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-right: 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.file-input::file-selector-button:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 10px rgba(217, 70, 239, 0.5);
}
