.cloudflare-upload-status { font-size:13px; }
.cloudflare-badge { box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

.cf-stream-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
}
 .cf-stream-video-wrapper iframe {
	 position: absolute;
      top: 0;
      left: 0;
     width: 100%;
     height: 100%;
    border: 0;
  object-fit: contain;
}

.cf-stream-video-wrapper.portrait-video {
    aspect-ratio: 9 / 16;
    max-width: 400px; 
    margin: 0 auto;
	border-radius: 10px;
    overflow: hidden;
}
.acf-field[data-name="cloudflare_stream_uid"], .acf-field[data-name="featured_image_r2_key"], .acf-repeater .acf-table th[data-name="cloudflare_r2_url"], .acf-field[data-name="cloudflare_r2_url"],
.acf-field[data-name="before_photo_key"],.acf-field[data-name="progress_photo_key"],.acf-field[data-name="after_photo_key"]{
	display: none;
}

.acf-form{
  width: 100%;
}

#acf-form {
  margin: 0 auto;
  padding: 40px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
}

/* Form Fields Container */
.acf-fields {
  display: grid;
}

/* Individual Field Styling */
.acf-form .acf-fields>.acf-field {
  border: unset;
  padding: 5px 10px;
}

.acf-form .acf-fields .acf-field[data-name="featured_image"]{
  margin: 10px 0;
}
.acf-form .acf-fields .select2-container .select2-search--inline .select2-search__field {
    margin-top: 0;
}

/* Labels */
.acf-form .acf-fields>.acf-field .acf-label {
  margin: 0;
}

.acf-label label {
  display: block;
  font-weight: 600;
  color: #2d3748;
  font-size: 15px;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
}

/* Required Field Indicator */
.acf-required {
  color: #e53e3e;
  font-weight: 500;
  margin-left: 4px;
}

/* Input Wrapper */
.acf-field .acf-input {
  overflow: hidden;
}

.acf-input-wrap {
  position: relative;
}

/* Base Input Styling */
.acf-field .acf-input input[type="text"],
.acf-field .acf-input input[type="email"],
.acf-field .acf-input input[type="date"],
.acf-field .acf-input textarea,
.acf-field .acf-input select {
  width: 100%;
  padding: 10px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 400;
  color: #2d3748;
  background: #ffffff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
}

/* Input Focus States */
.acf-input input[type="text"]:focus,
.acf-input input[type="email"]:focus,
.acf-input input[type="date"]:focus,
.acf-input textarea:focus,
.acf-input select:focus {
  border-color: #3182ce;
}

/* Placeholder Styling */
.acf-input input::placeholder,
.acf-input textarea::placeholder {
  color: #a0aec0;
  font-weight: 400;
}

/* Textarea Specific */
.acf-input textarea {
  resize: vertical;
  font-family: inherit;
}

/* Select Dropdown */
.acf-input select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 16px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 48px;
}

/* Date Picker */
.acf-date-picker {
  position: relative;
}

.acf-date-picker input {
  padding-right: 48px;
}
.acf-repeater .acf-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.acf-repeater .acf-table th {
  background: #f1f5f9;
  padding: 16px;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.acf-repeater .acf-table td {
  padding: 16px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}

.acf-repeater .acf-row:last-child td {
  border-bottom: none;
}

.acf-repeater-add-row {
  background: #3182ce !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.acf-repeater-add-row:hover {
  background: #2c5aa0 !important;
  transform: translateY(-1px);
}

/* Row Handle */
.acf-row-handle {
  width: 60px;
  text-align: center;
}

.acf-row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

/* Icon Buttons */
.acf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  margin: 0 2px;
  transition: all 0.2s;
  text-decoration: none;
}

.acf-icon.-plus {
  background: #10b981;
  color: white;
}

.acf-icon.-minus {
  background: #ef4444;
  color: white;
}

.acf-icon.-duplicate {
  background: #6366f1;
  color: white;
}

.acf-icon:hover {
  transform: scale(1.1);
}

/* Select2 Styling */
.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
  border: 1px solid #e2e8f0 !important;
  border-radius: 12px !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: #3182ce !important;
  box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.1) !important;
}

.select2-selection__rendered {
  padding: 0 !important;
}

.select2-search__field {
  padding: 8px !important;
}

/* Gallery Fields */
.acf-gallery {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  height: 300px !important;
}

.acf-gallery-main {
  padding: 24px;
  background: white;
}

.acf-gallery-toolbar {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 16px 24px;
}

.acf-gallery-add {
    background: #1e4862!important;
    color: white!important;
    border: none!important;
    padding: 12px 24px!important;
    border-radius: 8px!important;
    font-weight: 600!important;
    text-decoration: none!important;
    display: inline-block!important;
    transition: all 0.2s!important;
}

.acf-gallery-add:hover {
  background: #059669 !important;
  transform: translateY(-1px);
}


.acf-image-uploader p {
  margin: 0 0 16px 0;
  color: #64748b;
  font-size: 16px;
}

.acf-image-uploader .acf-button {
  background: #3182ce !important;
  color: white !important;
  border: none !important;
  padding: 12px 24px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: all 0.2s !important;
}

.acf-image-uploader .acf-button:hover {
  background: #2c5aa0 !important;
  transform: translateY(-1px);
}

/* Submit Button */
.acf-form-submit {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid #e2e8f0;
}
.acf-form-submit:nth-child(1) {
    border-top: unset;
    margin-top: 0;
   	padding: 0;
}
.acf-form-submit:nth-child(1) {
	position: fixed;
    bottom: 5%;
    z-index: 99999;
    right: 3%;
}

@media(min-width: 1024px){
  .acf-form-submit:nth-child(1) {
      position: sticky;
      top: 15%;
      z-index: 99900;
      display: flex;
      justify-content: end;    
  }
  .acf-form-submit:nth-child(1) input[type="submit"]{
      position: absolute;
      right: -70%;
      z-index: 9999999;
      bottom: 20%;
  }
}

.acf-form-submit input[type="submit"] {
   background: linear-gradient(135deg, #667eea 0%, #e71e2e 100%) !important;
  color: white !important;
  border: none !important;
  padding: 18px 48px !important;
  border-radius: 12px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3) !important;
}

.acf-form-submit input[type="submit"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4) !important;
}

.acf-form-submit input[type="submit"]:active {
  transform: translateY(0) !important;
}

/* Spinner */
.acf-spinner {
  margin-left: 16px;
  opacity: 1;
  transition: opacity 0.3s;
}

/* Hidden Email Validation Field */
.acf-field--validate-email {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
	
	/* Base Input Styling */
	.acf-field .acf-input input[type="text"],
	.acf-field .acf-input input[type="email"],
	.acf-field .acf-input input[type="date"],
	.acf-field .acf-input textarea,
	.acf-field .acf-input select {
	  padding: 6px 8px;
	}
	
.acf-repeater .acf-row-handle.remove {
    padding: 0px 15px;
}
.acf-repeater .acf-row-handle.order {
    display: none;
}
	
  #acf-form {
    padding: 0;
    border-radius: 12px;
  }
  
  .acf-fields {
    gap: 24px;
    display: block;
  }
  
  .acf-fields>.acf-field {
    padding: 10px;
  }
  
  .acf-input input[type="text"],
  .acf-input input[type="email"],
  .acf-input input[type="date"],
  .acf-input textarea,
  .acf-input select {
    padding: 14px 16px;
    font-size: 16px;
  }
  
  .acf-repeater .acf-table th,
  .acf-repeater .acf-table td {
    padding: 12px 8px;
    font-size: 14px;
  }
  
  .acf-form-submit input[type="submit"] {
     padding: 12px 20px !important;
    font-size: 12px !important;
  }
}

/* Loading State */
.acf-form.loading .acf-spinner {
  opacity: 1;
}

/* Error States */
.acf-field.error .acf-input input,
.acf-field.error .acf-input textarea,
.acf-field.error .acf-input select {
  border-color: #e53e3e;
  box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1);
}

/* Success States */
.acf-field.success .acf-input input,
.acf-field.success .acf-input textarea,
.acf-field.success .acf-input select {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

/* Smooth Animations */
* {
  box-sizing: border-box;
}

.acf-field {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

.acf-field:nth-child(1) { animation-delay: 0.1s; }
.acf-field:nth-child(2) { animation-delay: 0.2s; }
.acf-field:nth-child(3) { animation-delay: 0.3s; }
.acf-field:nth-child(4) { animation-delay: 0.4s; }
.acf-field:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body .media-modal h1,
body .media-modal h2,
body .media-modal h3,
body .media-modal h4 {
    font-size: 0px;
	display: none;
  visibility: hidden;
}
.media-router .media-menu-item:focus {
    box-shadow: unset;
}



/* Force "Upload Files" tab and hide the Library search */
.media-modal[data-active="gallery"] .media-menu-item:nth-child(2), /* Hides Library tab */
.media-modal[data-active="gallery"] .media-frame-router,
.media-modal[data-active="gallery"] .attachments-browser .media-toolbar {
    display: none !important;
}

.media-modal[data-active="gallery"] .media-frame-content {
    top: 0 !important;
}