.ypp-container {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.ypp-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.ypp-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Modern Popup Styles */
.ypp-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.ypp-popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin: auto;
    animation: slideUp 0.3s ease-out;
}

.ypp-popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
}

.ypp-popup-inner {
    position: relative;
}

.ypp-close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ypp-close-popup:hover {
    color: #333;
}

/* Modern Form Styles */
.ypp-popup-content .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ypp-popup-content .wpcf7-form p {
    margin: 0;
}

.ypp-popup-content .wpcf7-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 15px;
}

.ypp-popup-content .wpcf7-form input[type="text"],
.ypp-popup-content .wpcf7-form input[type="email"],
.ypp-popup-content .wpcf7-form textarea,
.ypp-popup-content .wpcf7-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: #f9f9f9;
    box-sizing: border-box;
}

.ypp-popup-content .wpcf7-form textarea {
    min-height: 120px;
    resize: vertical;
}

.ypp-popup-content .wpcf7-form input[type="text"]:focus,
.ypp-popup-content .wpcf7-form input[type="email"]:focus,
.ypp-popup-content .wpcf7-form textarea:focus,
.ypp-popup-content .wpcf7-form select:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    outline: none;
    background: #fff;
}

.ypp-popup-content .wpcf7-form .wpcf7-submit {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
    margin-top: 10px;
}

.ypp-popup-content .wpcf7-form .wpcf7-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(58, 12, 163, 0.3);
}

.ypp-popup-content .wpcf7-form .wpcf7-submit:active {
    transform: translateY(0);
}

/* Field Error Styles */
.ypp-field-error {
    border-color: #ff4444 !important;
    background-color: #fff6f6 !important;
}

.wpcf7-not-valid-tip {
    color: #ff4444;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* CF7 Response Messages */
.wpcf7-response-output {
    display: none;
    margin: 15px 0 0 0;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.wpcf7-mail-sent-ok {
    border: 1px solid #4caf50;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.wpcf7-validation-errors,
.wpcf7-mail-failed {
    border: 1px solid #f44336;
    background-color: #ffebee;
    color: #d32f2f;
}

/* Success Message Styles */
.ypp-success-message {
    text-align: center;
    padding: 20px;
}

.ypp-success-message h3 {
    color: #3a0ca3;
    margin: 20px 0 10px;
    font-size: 22px;
}

.ypp-success-message p {
    color: #555;
    font-size: 15px;
    line-height: 1.5;
}

/* Checkmark Animation */
.ypp-checkmark {
    width: 50px;
    height: 50px;
    display: block;
    margin: 0 auto;
}

.ypp-checkmark-circle {
    stroke: #3a0ca3;
    stroke-width: 2;
    animation: ypp-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
    fill: none;
}

.ypp-checkmark-check {
    stroke: #3a0ca3;
    stroke-width: 2;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: ypp-stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
    fill: none;
}

@keyframes ypp-stroke {
    100% { stroke-dashoffset: 0; }
}

/* Loading Spinner */
.ypp-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ypp-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes ypp-spin {
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .ypp-popup-content {
        padding: 25px 15px;
        border-radius: 12px;
    }
    
    .ypp-popup-content .wpcf7-form {
        gap: 12px;
    }
    
    .ypp-popup-content .wpcf7-form label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .ypp-popup-content .wpcf7-form input[type="text"],
    .ypp-popup-content .wpcf7-form input[type="email"],
    .ypp-popup-content .wpcf7-form textarea,
    .ypp-popup-content .wpcf7-form select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .ypp-popup-content .wpcf7-form .wpcf7-submit {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .ypp-success-message {
        padding: 15px;
    }
    
    .ypp-success-message h3 {
        font-size: 20px;
        margin: 15px 0 8px;
    }
    
    .ypp-success-message p {
        font-size: 14px;
    }
    
    .ypp-checkmark {
        width: 45px;
        height: 45px;
    }
}

/* Landscape mobile devices */
@media (max-width: 767px) and (orientation: landscape) {
    .ypp-popup-overlay {
        align-items: flex-start;
        padding-top: 20px;
        padding-bottom: 20px;
    }
    
    .ypp-popup-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Very small devices */
@media (max-width: 360px) {
    .ypp-popup-content {
        padding: 20px 12px;
    }
    
    .ypp-popup-content .wpcf7-form {
        gap: 10px;
    }
}
/* Contact Form Message Textarea */
.ypp-popup-content .wpcf7-form textarea {
  min-height: 50px; /* Set fixed height */
  height: 50px; /* Ensures consistent height */
  resize: vertical; /* Still allows vertical resize if needed */
  padding: 12px 15px;
  width: 100%;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.3s;
  background: #f9f9f9;
  box-sizing: border-box;
}

/* Adjustments for responsive behavior */
@media (max-width: 600px) {
  .ypp-popup-content .wpcf7-form textarea {
    height: 50px; /* Maintain height on mobile */
    min-height: 50px; /* Prevent shrinking */
    padding: 10px 12px; /* Slightly reduced padding */
  }
}

/* Landscape mobile devices */
@media (max-width: 767px) and (orientation: landscape) {
  .ypp-popup-content .wpcf7-form textarea {
    height: 50px; /* Ensure consistent height in landscape */
  }
}