/*
Theme Name: Fligno Web Design Agency
Theme URI: https://fligno.com/
Version: 1.0
Description: Mini Websites by FLigno
Author: Fligno Team
Author URI: https://fligno.com/
template: bb-theme
*/

/* Add your custom styles here... */
/* --- Modal Overlay and Positioning --- */
a{
    text-decoration: none;
}
a:hover{
    text-decoration: none;
}
.ccm-modal-overlay {
  display: flex; /* This remains the active state */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  font-family: Arial, sans-serif;
  
  /* Add opacity/visibility for smoother transition */
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* --- New Class to Hide Modal --- */
.ccm-modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  /* Use pointer-events to prevent interaction when invisible */
  pointer-events: none;
}
/* --- Modal Overlay and Positioning --- */


.ccm-modal-content {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 550px; /* Modal width control */
  padding: 30px;
  box-sizing: border-box;
}

/* --- Header and Title --- */
.ccm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.ccm-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 0;
}
.wpforms-title{
  font-size: 35px !important;
  color: #333;
  margin: 0;
}
.wpforms-title::after {
    content: "Get in touch with our team. We'll respond within 24 hours.";
    display: block;
	font-weight:600;
    font-size: 16px;
    color: #555;
    margin-top: 6px;
}
div.wpforms-container-full .wpforms-form .wpforms-head-container
 {
    margin: 0;
    padding: 0 0 0 0 !important;
}
.ccm-subtitle {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px 0;
}

.ccm-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  padding: 0;
  line-height: 1;
}

.ccm-close-btn:hover {
  background: none !important;
  border: none !important;
  color: #000000;
}


/* --- Form Layout --- */
.ccm-form {
  display: flex;
  flex-direction: column;
  gap: 15px; /* Vertical spacing between sections */
}

.ccm-form-row {
  display: flex;
  gap: 20px; /* Horizontal spacing between Name and Email */
}

.ccm-form-group {
  display: flex;
  flex-direction: column;
  flex: 1; /* Makes Name and Email fields equally wide */
}

.ccm-full-width {
  flex: none;
}

.ccm-form-group label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

/* --- Input and Select Styling --- */
.ccm-input,
.ccm-select {
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  color: #333;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none; /* Removes default browser styling for select */
  -moz-appearance: none;
  appearance: none;
}
#wpforms-276-field_4{
	  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  color: #333;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none; /* Removes default browser styling for select */
  -moz-appearance: none;
  appearance: none;
}

.ccm-select-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

/* Custom arrow for select field */
.ccm-select-arrow {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #666;
  pointer-events: none; /* Ensures clicks go to the select element */
}

.ccm-textarea {
  resize: vertical;
  min-height: 100px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  color: #333;
}

/* --- Submit Button Styling --- */
.ccm-submit-btn {
  background-color: #171717; /* Dark background */
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 5px;
}

.ccm-submit-btn:hover {
  background-color: #333333;
}

.wpforms-container .wpforms-submit-container button[type="submit"] {
    background-color: #171717 !important;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 5px;
	width:100%;
}

.wpforms-container .wpforms-submit-container button[type="submit"]:hover {
    background-color: #333333 !important;
}


/* --- Responsiveness (for the Name/Email row) --- */
@media (max-width: 480px) {
  .ccm-form-row {
    flex-direction: column;
    gap: 15px;
  }
}


/* Container for positioning at the top center */
.ccm-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000; /* Ensure it is above everything, including the modal overlay */
    pointer-events: none; /* Allows clicks to pass through the empty container area */
}

/* Individual Toast Message Box */
.ccm-toast-message {
    padding: 15px 30px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Initial hidden state for animation */
    opacity: 0; 
    transform: translateY(-20px); 
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* State when toast is visible */
.ccm-toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.ccm-toast-message.success {
    background-color: #e6ffed; /* Light green */
    color: #008744; /* Dark green text */
    border: 1px solid #c8f5d0;
}

.ccm-toast-message.error {
    background-color: #ffeaea; /* Light red */
    color: #cc0000; /* Dark red text */
    border: 1px solid #f9caca;
}

/* wp forms */
/* Make first row (Name + Email) 2 columns */
#wpforms-276-field_1-container,
#wpforms-276-field_2-container {
    width: 48%;
    display: inline-block;
    vertical-align: top;
    margin-right: 2%;
}

#wpforms-276-field_2-container {
    margin-right: 0;
}

/* Make second row (Company + Enquiry Type + Message) stacked in 1 column */
#wpforms-276-field_3-container{
	margin-top:15px !important;
}
#wpforms-276-field_3-container,
#wpforms-276-field_4-container,
#wpforms-276-field_5-container {
    width: 100% !important;
    display: block;
    margin-right: 0 !important;
}

/* Optional: spacing between the fields */
/* #wpforms-276-field_3-container,
#wpforms-276-field_4-container,
#wpforms-276-field_5-container {
    margin-bottom: 15px;
} */

/* Optional: make container flex for first row only */
.wpforms-field-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
}

/* --- 1. Turn on the Grid for Form 308 --- */
#wpforms-form-308 .wpforms-field-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Create two equal columns */
    gap: 10px; /* Space between the fields */
}

/* --- 2. Force Name Field (ID 1) to be Full Width --- */
#wpforms-308-field_1-container {
    grid-column: span 2; /* This tells the name to take up 2 slots */
}

/* --- 3. Clean up standard WPForms styling --- */
#wpforms-form-308 .wpforms-field {
    clear: none !important;
    width: 100% !important;
    margin-bottom: 0 !important;
}

/* --- 4. Hide Invisible Fields (Crucial for alignment) --- */
/* This ensures hidden honeypot fields don't create empty gaps in your columns */
#wpforms-form-308 .wpforms-field[style*="display: none"],
#wpforms-form-308 .wpforms-field[style*="visibility: hidden"],
#wpforms-form-308 .wpforms-field[style*="height: 1px"] {
    display: none !important;
}

/* --- 5. Mobile Responsiveness --- */
/* On phones, stack everything back to 1 column */
@media only screen and (max-width: 600px) {
    #wpforms-form-308 .wpforms-field-container {
        grid-template-columns: 1fr !important;
    }
    
    #wpforms-308-field_1-container {
        grid-column: span 1; /* Reset name to normal width on mobile */
    }
}
/* Target the form fields specifically inside the modal */
#ccm-modal .wpforms-container .wpforms-field {
    padding: 0 !important; /* Use !important here if necessary */
}