/* Main Content */
.main-content {
    padding: 2rem 0 4rem;
    min-height: calc(100vh - 300px);
}

.form-title {
    color: var(--kfupm-primary);
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.progress {
    flex: 1;
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    background-color: var(--kfupm-primary);
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--kfupm-primary);
    font-weight: 600;
    min-width: 50px;
}

/* Section Title */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--kfupm-dark);
    margin-bottom: 1.5rem;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: var(--kfupm-dark);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #dc3545;
}

.form-control,
.form-select {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--kfupm-teal);
    box-shadow: 0 0 0 0.2rem rgba(17, 95, 102, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

.form-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.35rem;
}

.input-group-icon {
    position: relative;
}

.input-group-icon .form-control,
.input-group-icon .form-select {
    padding-right: 50px;
}

.input-icon-btn {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 48px;
    background-color: var(--kfupm-teal);
    border: none;
    border-radius: 0 4px 4px 0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.input-icon-btn.passive {
    pointer-events: none;
}

.input-icon-btn:hover {
    background-color: #0d4a50;
}

/* Checkbox Styles */
.form-check {
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin-top: 0.2em;
    border: 2px solid #adb5bd;
}

.form-check-input:checked {
    background-color: var(--kfupm-teal);
    border-color: var(--kfupm-teal);
}

.form-check-label {
    font-size: 0.9rem;
    color: #555;
}

.date-inputs-row,
.time-inputs-row {
    display: flex;
    gap: 1rem;
}

.date-inputs-row .input-group-icon,
.time-inputs-row .input-group-icon {
    flex: 1;
}

/* Toggle Buttons */
.toggle-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.toggle-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--kfupm-teal);
    background: white;
    color: var(--kfupm-teal);
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 25px;
}

.toggle-btn.active {
    background-color: var(--kfupm-teal);
    color: white;
}

.toggle-btn:hover:not(.active) {
    background-color: rgba(17, 95, 102, 0.1);
}

/* Navigation Buttons */
.btn-nav {
    padding: 0.75rem 3rem;
    font-weight: 500;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-back {
    background-color: white;
    border: 1.5px solid var(--kfupm-teal);
    color: var(--kfupm-teal);
    padding: 0.5rem 0;
    font-weight: 500;
    border-radius: 4px;
    font-size: 1rem;
    min-width: 50%;
    text-align: center;
}

.btn-back:hover {
    background-color: #f8f9fa;
    color: var(--kfupm-teal);
}

.btn-next {
    background-color: var(--kfupm-teal);
    border: 1px solid var(--kfupm-teal);
    color: white;
}

.btn-next:hover {
    background-color: #0d4a50;
}

.btn-group-nav {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: end;
}

.btn-next {
    padding: 0.5rem 0;
    font-weight: 500;
    border-radius: 4px;
    font-size: 1rem;
    min-width: 50%;
    text-align: center;
}

/* Preview Section */
.preview-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--kfupm-dark);
    margin-bottom: 1.5rem;
}

.preview-card {
    background: linear-gradient(135deg, #f4f4f8 0%, #f4f4f8 100%);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.preview-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--kfupm-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.preview-category i {
    font-size: 1.1rem;
}

.preview-content {
    display: flex;
    gap: 1rem;
}

.preview-thumbnail {
    width: 200px;
    min-width: 200px;
    height: 120px;
    background: linear-gradient(135deg, var(--kfupm-teal) 0%, #1a7a82 100%);
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.preview-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-details {
    flex: 1;
}

.preview-event-title {
    color: var(--kfupm-teal);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: underline;
    margin-bottom: 0.5rem;
}

.preview-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.preview-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.preview-meta-item i {
    color: var(--kfupm-teal);
    font-size: 0.9rem;
}

.preview-description {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.preview-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 1rem;
    line-height: 1.5;
}

/* Form Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

input[type="time"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-calendar-picker-indicator {
    display: none;
    -webkit-appearance: none;
}

.form-step {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.form-step.active {
    display: block;
    opacity: 1;
}

.form-step.fade-out {
    opacity: 0;
}

.form-step.fade-in {
    opacity: 1;
}

/* ==========================================
   THUMBNAIL UPLOAD OPTIONS STYLES
   ========================================== */

/* ------------------------------------------
   OPTION 1: Modal Approach Styles
   ------------------------------------------ */

.ratio-example-link {
    color: var(--kfupm-teal, #008080);
    text-decoration: none;
    margin-left: 8px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.ratio-example-link:hover {
    color: #006666;
    text-decoration: underline;
}

/* Modal Styles */
#thumbnailGuideModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

#thumbnailGuideModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
    padding: 1rem 1.5rem;
}

#thumbnailGuideModal .modal-title {
    color: #333;
    font-weight: 600;
}

#thumbnailGuideModal .modal-body {
    padding: 1.5rem;
}

.ratio-guide-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ratio-guide-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

.ratio-guide-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ratio-demo-box {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #e8f5f5 0%, #d0ebeb 100%);
    border: 3px dashed var(--kfupm-teal, #008080);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ratio-demo-box::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 1px solid rgba(0, 128, 128, 0.3);
    border-radius: 4px;
}

.ratio-dimensions {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kfupm-teal, #008080);
}

.ratio-aspect {
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

.ratio-guide-info {
    flex: 1;
}

.ratio-guide-info h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.ratio-guide-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.ratio-guide-info li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

.ratio-guide-info li:last-child {
    border-bottom: none;
}

.ratio-guide-tip {
    background-color: #fff9e6;
    border: 1px solid #ffe08a;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: #856404;
    font-size: 0.9rem;
}

.ratio-guide-tip i {
    color: #ffc107;
}

#thumbnailGuideModal .modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}


/* ------------------------------------------
   OPTION 2: Dropzone Approach Styles
   ------------------------------------------ */

.thumbnail-dropzone {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-width: 640px;     /* optional */
    margin: 0 auto;       /* optional: center */

    border: 2px dashed #ccc;
    border-radius: 0px;
    background-color: #fafafa;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}

.thumbnail-dropzone:hover {
    border-color: var(--kfupm-teal, #008080);
    background-color: #f0f8f8;
}

.thumbnail-dropzone.dragover {
    border-color: var(--kfupm-teal, #008080);
    background-color: #e8f5f5;
    transform: scale(1.01);
}

.thumbnail-dropzone.has-image {
    border-style: solid;
    border-color: var(--kfupm-teal, #008080);
}

/* Ratio guide overlay */
.dropzone-ratio-guide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.ratio-box {
    width: 90%;
    height: 85%;
    border: 1px dashed rgba(0, 128, 128, 0.3);
    border-radius: 0px;
    position: relative;
}

.ratio-label {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(0, 128, 128, 0.1);
    color: var(--kfupm-teal, #008080);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Dropzone content */
.dropzone-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
}

.dropzone-icon {
    font-size: 2.5rem;
    color: #bbb;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.thumbnail-dropzone:hover .dropzone-icon {
    color: var(--kfupm-teal, #008080);
}

.dropzone-text {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.dropzone-hint {
    margin: 0.25rem 0 0 0;
    font-size: 0.8rem;
    color: #999;
}

/* Dropzone preview */
.dropzone-preview {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}

.dropzone-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
   border-radius: inherit;
}

.dropzone-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.dropzone-remove:hover {
    background-color: rgba(220, 53, 69, 0.9);
}

/* Hide elements when image is present */
.thumbnail-dropzone.has-image .dropzone-content,
.thumbnail-dropzone.has-image .dropzone-ratio-guide {
    display: none;
}

.thumbnail-dropzone.has-image .dropzone-preview {
    display: block !important;
}

/* Form Validation Styles */

/* Invalid field styling */
.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.form-check-input.is-invalid {
    border-color: #dc3545 !important;
}

.form-check-input.is-invalid ~ .form-check-label {
    color: #dc3545;
}

/* Error message styling */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.invalid-feedback.d-block {
    display: block;
}

/* Animation for error shake */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.is-invalid {
    animation: shake 0.5s ease-in-out;
}

/* Dropzone invalid state */
.thumbnail-dropzone.is-invalid,
.thumbnail-upload-dropzone-option .is-invalid + .thumbnail-dropzone {
    border-color: #dc3545 !important;
}

/* Focus state for invalid fields */
.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Error icon (optional enhancement) */
.invalid-feedback::before {
    content: "⚠ ";
    font-weight: bold;
}

/* Toast notification for validation errors (optional) */
.validation-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #dc3545;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.validation-toast.hide {
    animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
@media (min-width: 992px) { /* Bootstrap lg */
  .preview-sticky {
    position: sticky;
    top: 110px;           /* adjust to your header height */
    align-self: flex-start;
  }
}

.submission-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: #e6f4ea; /* light green */
  border-left: 4px solid #28a745; /* KFUPM green */
  border-radius: 8px;
  color: #1e4620;
  font-size: 0.9rem;
  line-height: 1.6;
}

.submission-notice .notice-icon {
  font-size: 1.1rem;
  margin-top: 0.15rem;
  color: #28a745;
  flex-shrink: 0;
}

.submission-notice a {
  color: #4577c4;
  font-weight: 600;
  text-decoration: underline;
}

.submission-notice a:hover {
  color: #4577c4;
}