/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

/* Modal Container */
.modal-container {
    width: 100%;
    max-width: 600px;
    margin: auto;
}

/* Modal Box */
.modal-box {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    position: relative;
}

/* Modal Title */
.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

/* Labels */
.modal-label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #444;
}

/* Inputs and Textarea */
.modal-input,
.modal-textarea {
    width: 100%;
    padding: 0.5rem;
    font-size: 1rem;
    text-align: justify;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-textarea {
    min-height: 160px;
    resize: vertical;
}

/* Action Buttons */
.modal-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.image-upload-preview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.upload-side {
    flex: 1;
}

.preview-side {
    flex: 1;
    text-align: center;
}
.image-placeholder {
    height: 150px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9f9f9;
}

.preview-side img {
    height: 150px;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.upload-hint {
    display: block; 
    margin-top: 6px;
    font-size: 0.85rem;
    color: #666;
}

.date-range-group {
    display: flex;
    gap: 20px;
    margin-top: 1rem;
}

.date-field {
    flex: 1;
}

.date-field .modal-label {
    margin-top: 0;
}

/* Primary Button */
.btn-primary {
    background-color: #28a745; /* Bootstrap-style green */
    color: white;
    font-weight: bold;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #218838;
}


/* Secondary Button */
.btn-secondary {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.25rem;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
}

/* Trigger Button */
.modal-trigger {
    text-align: center;
    margin-top: 2rem;
}

.btn-open {
    background-color: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.btn-open:hover {
    background-color: #0056b3;
}

.archive-notice, 
.campaign-notice,
.modal-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 14px;
}

.read-only-field {
    background-color: #f5f5f5;
    pointer-events: none;
    opacity: 0.8;
}

.video-instructions {
  background: #f8f9fa;
  border-left: 4px solid #007bff;
  padding: 10px 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  font-size: 14px;
}

.video-instructions ol {
  margin: 8px 0 0 20px;
  padding: 0;
}

.video-instructions code {
  background-color: #e9ecef;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: Georgia, 'Times New Roman', Times, serif;
}

.video-instructions {
  background: #f9f9f9;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  overflow: hidden;
}

.video-instructions h4 {
  color: #333;
  margin-bottom: 8px;
}

.video-instructions ol {
  padding-left: 18px;
}

.video-instructions code {
  background-color: #f1f1f1;
  padding: 2px 5px;
  border-radius: 4px;
}

.note {
  margin-top: 8px;
  color: #555;
  font-size: 0.9em;
  text-align: center;
}

/* === Swiper Styling (Video Instructions) === */
.myVideoSwiper {
  width: 100%;
  padding-bottom: 30px; /* gives space for pagination */
}

/* Center pagination dots */
.video-swiper-pagination {
  position: relative;
  bottom: 0;
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

/* Dots appearance */
.video-swiper-pagination-bullet {
  background: #aaa;
  opacity: 0.7;
  margin: 0 4px;
}

.video-swiper-pagination-bullet-active {
  background: #333;
  opacity: 1;
}

/* Adjust Swiper navigation buttons */
.video-swiper-button-prev,
.video-swiper-button-next {
  color: #666;
  transition: color 0.2s ease;
}

.video-swiper-button-prev:hover,
.video-swiper-button-next:hover {
  color: #000;
}

/* === Fix overlap & spacing === */
.video-instructions {
  min-height: 180px; /* ensures consistent height for each instruction */
  padding: 20px 4px 20px 18px; /* top, right, bottom, left — right = 0 */
  overflow: hidden;
  border-radius: 10px;
  background: #f9f9f9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
   line-height: 1.6;            /* adjust vertical line spacing (1.4–1.8 looks good) */
  letter-spacing: 0.3px;       /* adjust horizontal character spacing (0.2–0.5px is subtle) */
}


.video-preview {
  margin-top: 15px;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 10px;
  background-color: #fafafa;
  text-align: center;
}

.video-preview iframe {
  width: 100%;
  height: 250px;
  border-radius: 6px;
}


/* === MODAL ICON STYLING === */
.modal-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem; /* spacing below the icon */
}

.modal-icon img {
  width: 100px;          /* adjust as needed */
  height: 100px;
  object-fit: contain;  /* ensures proper scaling */
  border-radius: 50%;   /* makes it circular (optional) */
  padding: 10px;        /* inner spacing */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* light shadow for depth */
  transition: transform 0.2s ease-in-out;
}

.modal-icon img:hover {
  transform: scale(1.05); /* small zoom effect */
}

#group_description .modal-label,
#group_subDescription .modal-label {
    text-align: justify !important;
    display: block !important;         /* ensures block-level layout */
    line-height: 1.6 !important;       /* improves readability for multi-line labels */
    white-space: normal !important;    /* allows wrapping */
    word-wrap: break-word !important;  /* breaks long words if needed */
}

.modal-payment-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.payment-logo {
  width: 120px;
  margin-bottom: 15px;
}

.payment-qr {
  width: 250px;
  border: 2px solid #ccc;
  border-radius: 10px;
}

/* === Two-Column Layout for Virtual Tour Modal === */
.modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* two equal columns */
    gap: 20px;
    margin-top: 1rem;
}

/* Left column: form fields */
.modal-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Right column: image section */
.modal-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Adjust image preview layout */
.modal-right .image-upload-preview {
    flex-direction: column;
    gap: 10px;
}

.modal-right .preview-side img {
    width: 100%;
    height: auto;
    max-height: 335px;
    object-fit: cover;
    border-radius: 6px;
}

/* Add this to style-modal.css if you want specific styling for the fee rows */
.fee-edit-row:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

.fee-edit-row input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.2);
}

/* Responsiveness */
@media (max-width: 700px) {
    .modal-content-grid {
        grid-template-columns: 1fr;
    }

    .modal-right {
        margin-top: 1rem;
    }
}

/* === Wider layout only for Virtual Tour Modal === */
#virtualTourModal {
    max-width: 1800px; /* default 600px → now wider */
}

/* OR, if you prefer targeting via the Modal ID */
#virtualTourModal .modal-textarea {
    min-height: 310px !important;
}

@media (max-width: 768px) {
    #virtualTourModal {
        max-width: 95%; /* responsive fallback */
    }
}

/* Validation Styles */
.input-error {
    border: 1px solid #dc3545 !important; /* Red border */
    background-color: #fff8f8 !important;
}

.validation-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
    display: block;
    width: 100%;
}

.fee-input-wrapper {
    display: flex;
    flex-direction: column; /* Allows error message to sit below input */
    align-items: flex-end; /* Aligns input to the right */
}

/* Ensure the Php wrapper looks right even with errors */
.php-wrapper {
    display: flex; 
    align-items: center; 
    background: #f9f9f9; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    padding: 0 8px;
}