/* Modern Flat Styling - Applies to All Pages */

/* Main body improvements */
body {
    background: #1a1a1a !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-size: 16px !important;
}

/* Main container improvements */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Card styling improvements */
.card {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e5e7eb !important;
    padding: 2rem !important;
    margin-bottom: 2rem;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

/* Form sections */
.row {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Form inputs improvements - Make all dropdowns look the same */
.form-control, select, option, input, textarea {
    background-color: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.875rem 1rem !important;
    font-size: 1rem !important;
    transition: all 0.2s ease;
    position: relative;
}

.form-control:focus, select:focus, input:focus, textarea:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1) !important;
    background-color: #ffffff !important;
}

/* ONLY text input fields get text cursor */
input[type="text"],
input[type="email"], 
input[type="password"],
input[type="number"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea {
    background-color: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    cursor: text !important;
}

/* Select dropdowns keep default cursor */
select {
    cursor: pointer !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236b7280' viewBox='0 0 20 20'%3E%3Cpath d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem !important;
    background-color: #ffffff !important;
}

/* Checkboxes and toggles keep default cursor */
input[type="checkbox"],
input[type="radio"],
.toggle {
    cursor: pointer !important;
}

/* Force all option elements to be white */
select option {
    background-color: #ffffff !important;
    color: #374151 !important;
}

/* Target specific selects that might have dark backgrounds */
select[name="expireTime"],
select[name="exposureLevel"],
select.selection-for {
    background-color: #ffffff !important;
    color: #374151 !important;
}

select[name="expireTime"] option,
select[name="exposureLevel"] option,
select.selection-for option {
    background-color: #ffffff !important;
    color: #374151 !important;
}

/* Fix any dark background issues on form cells/containers */
.form-group,
.form-field,
.input-group,
.form-row,
div[class*="form"],
td,
th,
.row:not(.hiddenforblackout),
.col-md-12:not(.hiddenforblackout),
.col-md-6:not(.hiddenforblackout),
.col-md-4:not(.hiddenforblackout),
.col-md-3:not(.hiddenforblackout),
section,
.form-section,
.card-body,
.container-fluid,
.content,
#content,
main {
    background-color: transparent !important;
}

/* Ensure table cells are clean */
table, table td, table th {
    background-color: #ffffff !important;
    color: #374151 !important;
}

/* Fix any blackout mode issues on other pages */
body:not(.blackout-mode) .form-control,
body:not(.blackout-mode) select,
body:not(.blackout-mode) input,
body:not(.blackout-mode) textarea {
    background-color: #ffffff !important;
    color: #374151 !important;
}

/* Override any WordPress or theme dark backgrounds only in content areas */
.entry-content,
.post-content,
.page-content,
.site-content,
.main-content {
    background-color: transparent !important;
}

/* Labels */
label {
    font-weight: 600 !important;
    color: #374151 !important;
    margin-bottom: 0.5rem !important;
    font-size: 1rem !important;
    letter-spacing: 0.025em;
}

/* Button improvements */
.btn {
    padding: 0.875rem 1.5rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
    cursor: pointer;
}

.btn-primary {
    background: #667eea !important;
    color: white !important;
}

.btn-primary:hover {
    background: #5a6fd8 !important;
}

.btn-danger {
    background: #ef4444 !important;
    color: white !important;
}

.btn-info {
    background: #06b6d4 !important;
    color: white !important;
}

/* Custom radio buttons styling */
.custom-radio {
    display: none;
}

.custom-radio + label {
    display: inline-block !important;
    padding: 0.875rem 1rem !important;
    background-color: white !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
    font-size: 1rem !important;
    margin: 0.25rem !important;
}

.custom-radio + label:hover {
    border-color: #667eea !important;
    background: #f8fafc !important;
}

.custom-radio:checked + label {
    background: #667eea !important;
    color: white !important;
    border-color: #667eea !important;
}

/* Checkbox styling */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
    min-height: auto;
}

.form-check-input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #667eea;
    margin-top: 2px;
    flex-shrink: 0;
}

.form-check-label {
    font-weight: 500 !important;
    color: #374151 !important;
    cursor: pointer;
    margin-bottom: 0 !important;
    line-height: 1.5;
    font-size: 1rem !important;
}

/* Image upload styling - Make smaller and fit on one line */
.row.hiddenforblackout .col-md-3 {
    padding: 0.75rem;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    text-align: center;
    background: #fafafa;
    margin: 0.25rem;
    flex: 1;
    min-width: 0;
    max-width: 23%;
}

/* Make sure image upload row stays on one line */
.row.hiddenforblackout {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
}

input[type="file"] {
    margin-top: 0.5rem;
    padding: 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 0.875rem !important;
    width: 100%;
}

/* Alert improvements */
.alert {
    padding: 1rem 1.25rem !important;
    border-radius: 6px !important;
    margin-bottom: 1rem !important;
    font-weight: 500 !important;
    border: 1px solid !important;
    font-size: 1rem !important;
}

.alert-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border: 1px solid #a7f3d0 !important;
}

.alert-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fca5a5 !important;
}

.alert-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: 1px solid #fde68a !important;
}

.alert-info {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
}

/* Progress bar */
.progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* Custom fields for additional options */
.custom-fields {
    margin-top: 15px !important;
    padding: 1.5rem !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
}

.custom-checkbox {
    margin-top: 10px;
}

.custom-checkbox label {
    font-weight: bold !important;
    font-size: 1rem !important;
}

.inline-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.textarea-80 {
    flex: 1 1 75%;
}

.number-20 {
    flex: 1 1 25%;
    max-width: 150px;
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

/* Modal improvements */
.modal {
    z-index: 9999 !important;
}

.modal-content {
    background-color: white !important;
    border-radius: 6px !important;
    padding: 2rem !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e5e7eb !important;
}

.modal-header h4 {
    color: #374151 !important;
    font-weight: 600 !important;
    font-size: 1.125rem !important;
}

/* Toggle switch styling */
.toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 32px;
    background-color: #cbd5e1;
    border-radius: 32px;
    cursor: pointer;
    transition: 0.3s;
    border: none !important;
    outline: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.toggle:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle:checked {
    background-color: #667eea !important;
}

.toggle:checked:before {
    transform: translateX(28px);
}

/* Blackout mode */
.blackout-text {
    background: #1a1a1a !important;
    color: #ffffff !important;
}

.blackout-text .form-control {
    background: #2d2d2d !important;
    color: #ffffff !important;
    border-color: #404040 !important;
}

/* Custom select dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.select-selected {
    background-color: #ffffff !important;
    color: #374151 !important;
    padding: 0.875rem 1rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    position: relative;
    user-select: none;
    font-size: 1rem !important;
}

.select-selected::after {
    content: "▼";
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #6b7280;
}

.select-items {
    position: absolute;
    background-color: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
    border-top: none !important;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border-radius: 0 0 6px 6px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.select-items div {
    padding: 0.875rem 1rem !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 1rem !important;
    background-color: #ffffff !important;
    color: #374151 !important;
}

.select-items div:hover {
    background-color: #f3f4f6 !important;
}

.select-items div.disabled {
    color: #9ca3af !important;
    pointer-events: none !important;
}

/* Disabled elements */
.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Image list container styling */
#image-list-container {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
    gap: 1rem !important;
    margin-bottom: 1rem !important;
}

#image-list-container > div {
    background: white !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    border: 2px solid #e5e7eb !important;
    text-align: center !important;
}

#image-list-container img {
    width: 100% !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 4px !important;
    margin-bottom: 0.5rem !important;
}

/* Form group spacing */
.form-group {
    margin-bottom: 1.5rem !important;
}

/* Section headers */
.card-header {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: transparent !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

/* Fix checkbox layout - make ALL boxes look identical */
.row.hiddenforblackout[style*="justify-content: space-around"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

.row.hiddenforblackout .checkdefaultbg {
    margin-bottom: 0.5rem !important;
}

.row.hiddenforblackout .col-md-3.checkdefaultbg,
.row.hiddenforblackout .col-md-6.checkdefaultbg {
    flex: 0 1 32% !important;
    width: auto !important;
    max-width: 32% !important;
}

/* Make ALL checkbox containers look EXACTLY the same as the first two */
.row.hiddenforblackout .checkdefaultbg {
    padding: 0.75rem !important;
    border: 1px dashed #d1d5db !important;
    border-radius: 6px !important;
    background: #fafafa !important;
    margin: 0.25rem !important;
}

.row.hiddenforblackout .checkdefaultbg .form-check {
    padding: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
    background: transparent !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
}

.row.hiddenforblackout .checkdefaultbg .form-check-label {
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    color: #374151 !important;
    cursor: pointer !important;
    margin-bottom: 0 !important;
}

.row.hiddenforblackout .checkdefaultbg .form-check-input {
    width: 18px !important;
    height: 18px !important;
    accent-color: #667eea !important;
    margin-top: 2px !important;
    flex-shrink: 0 !important;
}

/* Move the alert message below the checkboxes */
.row.hiddenforblackout .alert-warning {
    order: 999 !important;
    width: 100% !important;
    margin-top: 1rem !important;
    flex-basis: 100% !important;
}

/* Fix alert box positioning */
.alert-warning[style*="margin-top: 44px"] {
    grid-column: 1 / -1 !important;
    margin-top: 1rem !important;
}

/* Ensure form groups don't overlap */
#commentExtendelect-group {
    grid-column: 1 / -1 !important;
    margin-top: 1rem !important;
    clear: both !important;
}

/* Computer select buttons styling */
.btn-comp {
    background-color: #ef4444 !important;
    color: white !important;
    width: 100% !important;
    margin-bottom: 0.5rem !important;
}

.btn-comp:hover:not(.disabled) {
    background-color: #dc2626 !important;
    transform: translateY(-2px);
}

/* Badge styling */
.badge {
    background-color: #667eea !important;
    color: white !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

/* Login link styling */
.login-link-cst a {
    background: #667eea !important;
    color: white !important;
    padding: 1rem 2rem !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
    font-size: 1rem !important;
}

.login-link-cst a:hover {
    background: #5a6fd8 !important;
}

/* Improve button container layout */
.button-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    justify-content: center !important;
}

/* First child layout improvements */
.firstchild-op {
    display: flex !important;
    flex-direction: column !important;
    gap: 2rem !important;
    width: 100% !important;
}

/* Time selection improvements */
.timeselection {
    background: #ffffff !important;
    padding: 1.5rem !important;
    border-radius: 6px !important;
    border: 1px solid #e5e7eb !important;
}

/* Blackout toggle specific styling */
.blackouttoggle {
    text-align: center !important;
    font-size: 1rem !important;
    padding: 1rem !important;
    background: #f3f4f6 !important;
    border-radius: 8px !important;
    border: 1 !important;
}

/* Upgrade links */
.upgrade-link {
    color: #667eea !important;
    text-decoration: underline !important;
}

.upgrade-badge {
    font-size: 12px !important;
    padding: 2px 4px !important;
    background-color: #f1f1f1 !important;
    border-radius: 10px !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .card {
        padding: 1.5rem !important;
    }
    
    .inline-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-radio + label {
        margin: 0.25rem 0 !important;
        text-align: center;
    }
    
    #image-list-container {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .row.hiddenforblackout[style*="justify-content: space-around"] {
        grid-template-columns: 1fr !important;
    }
    
    .row.hiddenforblackout {
        flex-wrap: wrap !important;
    }
    
    .row.hiddenforblackout .col-md-3 {
        max-width: 48% !important;
    }
}

/* Category dropdown positioning - Add line break */
.col-md-12.hiddenforblackout[style*="margin-bottom: 15px"] {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #e5e7eb !important;
}