.custom-calendar-container * {
    box-sizing: border-box;
}

.custom-calendar-container a {
    text-decoration: none;
}

.custom-current-month ul li {
    list-style: none;
}

/* Calendar container reset */
.custom-calendar {
    list-style: none;
    margin: 0;
    outline: none;
    padding: 0;
}

.custom-calendar-container {
    display: block;
    margin: 0 auto;
    width: 100%;
}

.custom-calendar {
    background: #FFFFFF1A;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid #FFFFFF4D;
    height: 430px;
    width: 100%;
    /* max-width: 520px; */
    margin: 0 auto;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.custom-calendar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    pointer-events: none;
    z-index: -1;
}

/* Front - Calendar */
.custom-calendar-front {
    display: block;
}

.custom-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    margin-bottom: 20px;
}

.custom-calendar-title {
    color: #fff;
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
    flex: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.custom-current-date {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex: 1;
}

.custom-current-date h1 {
    color: #fec00f;
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Navigation buttons */
.custom-nav-buttons {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: end;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.custom-nav-buttons .prev-month,
.custom-nav-buttons .next-month {
    pointer-events: auto;
}

.custom-month-display {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.custom-nav-buttons .prev-month,
.custom-nav-buttons .next-month {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.custom-nav-buttons .prev-month {
    margin-right: 20px;
}

.custom-nav-buttons .next-month {
    margin-left: 20px;
}

.custom-nav-buttons .prev-month:hover,
.custom-nav-buttons .next-month:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #333;
    transform: scale(1.1);
}

.custom-nav-buttons .prev-month:active,
.custom-nav-buttons .next-month:active {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0.95);
}

.custom-nav-buttons .next-month {
    background: rgba(254, 192, 15, 0.8);
    color: #000;
}

.custom-nav-buttons .next-month:hover {
    background: rgba(254, 192, 15, 0.9);
}

.custom-week-days {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: space-between;
    font-weight: 500;
    padding: 0px;
    font-size: 0.9em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    align-items: center;
}

.custom-week-days li {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.custom-days {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.custom-weeks {
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.custom-weeks div {
    display: flex;
    font-size: 1em;
    font-weight: 400;
    justify-content: space-between;
    margin-bottom: 15px;
    width: 100%;
}

.custom-last-month {
    opacity: .4;
    color: rgba(255, 255, 255, 0.4);
}

.custom-weeks span {
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.custom-weeks span.active {
    background: #fec00f;
    color: black;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(254, 192, 15, 0.4);
    transform: scale(1.1);
    border: 2px solid #e6ac0e;
}

.custom-weeks span.selected {
    background: #fec00f;
    color: black;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(254, 192, 15, 0.4);
    border: 2px solid #e6ac0e;
}

.custom-weeks span.available {
    background: rgba(254, 192, 15, 0.2);
    color: #fec00f;
    font-weight: 500;
    border: 1px solid rgba(254, 192, 15, 0.3);
}

.custom-weeks span.available:hover {
    background: rgba(254, 192, 15, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(254, 192, 15, 0.2);
}

.custom-weeks span:not(.custom-last-month):not(.available):hover {
    background: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
}

.custom-event {
    position: relative;
}

.custom-event:after {
    content: '•';
    color: #FF5722;
    font-size: 1.2em;
    position: absolute;
    right: -2px;
    top: -2px;
}

/* Back - Contact Form 7 */

.custom-calendar-back {
    height: 100%;
    display: none;
    flex-direction: column;
}

.custom-cf7-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 390px;
    overflow: hidden;
    position: relative;
}

.custom-cf7-header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    position: relative;
    /* Prevent header from shrinking */
}

.custom-cf7-header h3 {
    color: #fff;
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

.custom-cf7-header .custom-back-to-calendar {
    position: absolute;
    left: 0;
    height: 100%;
    display: flex;
    align-items: center;
}

.custom-selected-date {
    color: #666;
    font-size: 0.9em;
    margin: 0;
}

.custom-selected-date span {
    font-weight: 600;
    color: #fec00f;
}

.custom-cf7-form {
    flex: 1;
    padding: 10px 0;
}

/* CF7 Form Styling */
.custom-cf7-form .wpcf7-form {
    margin: 0;
}

.custom-cf7-form .wpcf7-form p {
    margin-bottom: 12px;
}

.custom-cf7-form .wpcf7-form label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 0.9em;
}

.custom-cf7-form .wpcf7-form input[type="text"],
.custom-cf7-form .wpcf7-form input[type="email"],
.custom-cf7-form .wpcf7-form input[type="tel"],
.custom-cf7-form .wpcf7-form textarea,
.custom-cf7-form .wpcf7-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    background: #fff;
    transition: border-color 0.3s ease;
}

.custom-cf7-form .wpcf7-form input:focus,
.custom-cf7-form .wpcf7-form textarea:focus,
.custom-cf7-form .wpcf7-form select:focus {
    outline: none;
    border-color: #fec00f;
    box-shadow: 0 0 0 2px rgba(254, 192, 15, 0.2);
}

.custom-cf7-form .wpcf7-form input[type="submit"] {
    background: #FEC00F;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.custom-cf7-form .wpcf7-form input[type="submit"]:hover {
    background: #FEC00F;
}

.custom-cf7-form .wpcf7-response-output {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

.custom-cf7-form .wpcf7-response-output.wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.custom-cf7-form .wpcf7-response-output.wpcf7-validation-errors {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Test Form Styling */
.custom-cf7-form .test-form {
    margin: 0;
}

.custom-cf7-form .test-form .form-row {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.custom-cf7-form .test-form .form-row:last-child {
    margin-bottom: 0;
}

.custom-cf7-form .test-form .form-row input[type="text"]:first-child,
.custom-cf7-form .test-form .form-row input[type="text"]:last-child {
    flex: 1;
}

.custom-cf7-form .test-form input[type="text"],
.custom-cf7-form .test-form input[type="email"],
.custom-cf7-form .test-form input[type="tel"] {
    width: 100%;
    height: 55px;
    background-color: #FFFFFF1A !important;
    color: #FFFFFF !important;
    border-radius: 8px 8px 8px 8px !important;
    padding: 12px 12px 12px 12px !important;    
    border: 1px solid rgba(208, 208, 208, 0.20) !important;
    /* backdrop-filter: blur(10px); */
    /* -webkit-backdrop-filter: blur(10px); */
    transition: all 0.3s ease;
    /* box-sizing: border-box; */
}

.custom-cf7-form .test-form input[type="text"]::placeholder,
.custom-cf7-form .test-form input[type="email"]::placeholder,
.custom-cf7-form .test-form input[type="tel"]::placeholder {
    font-size: 16px;
    color: #ffffff7a;
}

.custom-cf7-form .test-form input:focus {
    outline: none;
    border-color: none;
    background-color: #FFFFFF1A;
    box-shadow: none;
}

/* Form validation - red border */

.custom-cf7-form .test-form input[type="submit"] {
    background: rgba(254, 192, 15, 0.8);
    color: black;
    border: none;
    text-transform: uppercase;
    height: 55px;
    padding: 15px 24px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-size: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* .custom-cf7-form .test-form input[type="submit"]:hover {
    background: rgba(254, 192, 15, 0.9);
    box-shadow: 0 4px 15px rgba(254, 192, 15, 0.3);
} */

.custom-cf7-actions {
    position: static;
    margin-top: 0;
    padding: 0 0 12px 0;
    border: none;
    background: none;
    text-align: left;
}

.custom-back-to-calendar {
    font-size: 0.9em;
    padding: 8px 12px;
    background: none !important;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.custom-back-to-calendar:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Simple show/hide */

.custom-calendar-front,
.custom-calendar-back {
    width: 100%;
    height: 100%;
}

/* Elementor compatibility */
.elementor-widget-container .custom-calendar {
    margin: 0;
    display: block;
}

.elementor-widget-container .custom-calendar-container {
    display: block;
    width: 100%;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .custom-calendar-container {
    max-width: 100%;
    padding: 0px !important;
  }

  .custom-calendar {
    border-radius: 16px !important;
    height: auto;
    max-width: 100%;
  }

  .custom-calendar::before {
    border-radius: 16px !important;
  }

  .custom-current-date {
    padding: 15px 0;
  }

  .custom-current-date h1 {
    font-size: 1.1em;
  }

  .custom-nav-buttons {
    right: 0;
  }

  .custom-weeks {
    padding: 0;
  }

  .custom-weeks span {
    padding: 6px;
    font-size: 0.85em;
    width: 28px;
    height: 28px;
  }

  .custom-cf7-header h3 {
    font-size: 18px;
  }
}

@media (max-width: 400px) {
  .custom-calendar-title {
    font-size: 16px;
  }

  .custom-weeks span {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .custom-cf7-header h3 {
    font-size: 16px;
  }
}

/* Remove selected date styles */
.custom-selected-date,
.custom-selected-date * {
    display: none !important;
}