/* Frontend Styles for Free Trial Form */

.ftr-form-container, 
body .ftr-form-container,
.entry-content .ftr-form-container {
    max-width: 1300px !important; /* Further increased width */
    width: 100% !important; /* Full width */
    margin: 45px auto !important; /* Auto horizontal centering */
    padding: 60px 70px !important; /* Increased padding for more space inside the form */
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box !important;
    position: relative !important;
}

.ftr-form-header {
    text-align: center;
    margin-bottom: 40px; /* Increased spacing */
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0; /* Add a subtle separator */
}

.ftr-form-header h2 {
    color: #333;
    margin-bottom: 14px; /* Increased spacing */
    font-size: 30px; /* Increased title size */
    font-weight: 600;
}

.ftr-form-header p {
    color: #666;
    font-size: 17px; /* Increased description text */
    line-height: 1.6; /* Better line spacing */
    max-width: 600px;
    margin: 0 auto; /* Center the description */
}

.ftr-form-row {
    display: flex;
    gap: 32px; /* Increased gap between form elements */
    margin-bottom: 28px; /* Increased margin for spacing */
}

.ftr-form-row .ftr-form-group {
    flex: 1;
}

.ftr-form-group {
    margin-bottom: 28px; /* Increased margin */
}

.ftr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.required {
    color: #e74c3c;
}

.ftr-form-group input,
.ftr-form-group select,
.ftr-form-group textarea {
    width: 100%;
    padding: 15px 17px; /* Increased padding for input fields */
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.ftr-form-group input:focus,
.ftr-form-group select:focus,
.ftr-form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.ftr-form-group textarea {
    resize: vertical;
    min-height: 120px; /* Increased height for textarea */
}

.ftr-form-submit {
    text-align: center;
    margin-top: 40px; /* Increased top margin */
}

.ftr-form-container .ftr-form-submit .ftr-submit-btn,
.ftr-submit-btn,
button.ftr-submit-btn,
input[type="submit"].ftr-submit-btn {
    background: linear-gradient(to right, #1d50f0, #2e60ff) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 26px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
    position: relative !important;
    min-width: 210px !important;
    box-shadow: 0 4px 10px rgba(39, 81, 245, 0.15) !important; /* Lighter blue shadow */
    text-transform: none !important;
    line-height: normal !important;
}

.ftr-form-container .ftr-form-submit .ftr-submit-btn:hover,
.ftr-submit-btn:hover,
button.ftr-submit-btn:hover,
input[type="submit"].ftr-submit-btn:hover {
    background: linear-gradient(to right, #0034e5, #0e31a9) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(39, 81, 245, 0.25) !important;
    border-color: #2751f5 !important;
}

.ftr-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ftr-btn-loading {
    display: inline-block;
}

.ftr-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.ftr-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ftr-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Multi-select dropdown styles */
.ftr-multiselect-container {
    position: relative;
    width: 100%;
}

.ftr-multiselect-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
    min-height: 48px;
    box-sizing: border-box;
}

.ftr-multiselect-header:hover {
    border-color: #007cba;
}

.ftr-multiselect-header.active {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.ftr-multiselect-placeholder {
    color: #666;
    flex: 1;
    font-size: 16px;
}

.ftr-multiselect-placeholder.has-selection {
    color: #333;
}

.ftr-multiselect-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.ftr-multiselect-header.active .ftr-multiselect-arrow {
    transform: rotate(180deg);
}

.ftr-multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 2px solid #007cba;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ftr-multiselect-dropdown.show {
    display: block;
}

.ftr-multiselect-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.ftr-multiselect-option:hover {
    background-color: #f8f9fa;
}

.ftr-multiselect-option:last-child {
    border-bottom: none;
}

.ftr-multiselect-option input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ftr-multiselect-option label {
    flex: 1;
    cursor: pointer;
    font-size: 16px;
    margin: 0;
    font-weight: normal;
}

/* Clear All button for multi-select */
.ftr-multiselect-clear {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #111 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 6px 0 0 !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s !important;
    font-family: 'Noto Sans', 'Arial', sans-serif !important;
    font-weight: 400 !important;
    opacity: 0;
    pointer-events: none;
    border: 1px solid transparent !important;
    color: transparent !important;
}

.ftr-multiselect-clear:hover {
    background: #eee !important;
    color: #111 !important;
    border-color: #111 !important;
}

.ftr-multiselect-container.has-selection .ftr-multiselect-clear {
    opacity: 1;
    pointer-events: auto;
    border: 1px solid #111 !important;
    color: #111 !important;
}

/* Responsive Design */
/* WhatsApp Phone Input Styles */
.ftr-phone-input-container {
    display: flex;
    gap: 8px;
}

.ftr-phone-input-container select {
    flex: 0 0 auto;
    width: 120px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
}

.ftr-phone-input-container input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

@media (min-width: 1200px) {
    .ftr-form-container {
        max-width: 1080px; /* Increased from 1040px */
        padding: 52px 70px; /* Increased padding on large screens */
    }
    
    .ftr-form-row {
        gap: 42px; /* Increased gap on big screens */
    }
}

@media (max-width: 768px) {
    .ftr-form-container {
        margin: 10px;
        padding: 25px 20px; /* Reduced padding on mobile */
        width: 90%; /* Slightly less width on mobile */
    }
    
    .ftr-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ftr-form-header h2 {
        font-size: 24px;
    }
    
    .ftr-submit-btn {
        width: 100%;
        padding: 15px; /* Smaller padding on mobile */
        font-size: 16px; /* Smaller font on mobile */
    }
    
    .ftr-form-group input,
    .ftr-form-group select,
    .ftr-form-group textarea {
        padding: 12px 15px; /* Smaller padding on mobile */
    }
    
    .ftr-multiselect-header {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .ftr-multiselect-option {
        padding: 10px 12px;
    }
    
    .ftr-multiselect-option label {
        font-size: 15px;
    }
    
    .ftr-multiselect-container {
        margin-bottom: 10px;
    }
    
    .ftr-multiselect-header {
        padding: 14px 12px;
        min-height: 52px;
    }
    
    .ftr-multiselect-placeholder {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .ftr-multiselect-clear {
        right: 35px;
        padding: 4px 8px;
    }
    
    /* Mobile responsive for WhatsApp input */
    .ftr-phone-input-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .ftr-phone-input-container select {
        width: 100%;
        flex: none;
    }
}

/* Custom Player Field Animation */
#ftr-custom-player-group {
    overflow: hidden;
    transition: all 0.3s ease;
}

.ftr-form-group input.ftr-field-error,
.ftr-form-group select.ftr-field-error,
.ftr-form-group textarea.ftr-field-error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.ftr-form-group input.ftr-field-success,
.ftr-form-group select.ftr-field-success {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.ftr-char-counter {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

.ftr-char-counter.ftr-over-limit {
    color: #e74c3c;
    font-weight: bold;
}

/* Special styling for required field indicators */
.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Loading Animation */
.ftr-btn-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: ftr-spin 1s ease-in-out infinite;
}

@keyframes ftr-spin {
    to { transform: rotate(360deg); }
}

/* Ibo Player Pro specific fields styling */
.ftr-ibo-fields {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-top: 10px;
}

.ftr-ibo-fields .ftr-form-row {
    margin-bottom: 0;
}

.ftr-ibo-fields .ftr-form-group {
    margin-bottom: 20px;
}

.ftr-ibo-fields .ftr-form-group:last-child {
    margin-bottom: 0;
}

.ftr-field-hint {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* MAC Address input specific styling */
#ftr-mac-address {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 1px;
}

#ftr-mac-address::placeholder {
    letter-spacing: normal;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Device Key input styling */
#ftr-device-key {
    font-family: 'Courier New', Courier, monospace;
}

#ftr-device-key::placeholder {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Animation for showing/hiding Ibo fields */
#ftr-ibo-fields-group {
    overflow: hidden;
}

#ftr-ibo-fields-group.ftr-show {
    display: block;
}

@keyframes ftr-slide-down {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 200px;
        transform: translateY(0);
    }
}

/* Responsive design for Ibo fields */
@media (max-width: 768px) {
    .ftr-ibo-fields .ftr-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ftr-ibo-fields {
        padding: 15px;
    }
}

/* Toggle Switch for Adult Channels */
.ftr-toggle-switch {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.ftr-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.ftr-toggle-label {
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: #e1e8ed;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s ease;
}

.ftr-toggle-label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.ftr-toggle-input:checked + .ftr-toggle-label {
    background-color: #3498db;
}

.ftr-toggle-input:checked + .ftr-toggle-label::after {
    transform: translateX(30px);
}

.ftr-toggle-text {
    margin-left: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s ease;
}

.ftr-toggle-input:checked ~ .ftr-toggle-text {
    color: #3498db;
}

/* IPTV Trial Button Styling */
.iptv-trial-button {
  background: linear-gradient(to right, #1d50f0, #2e60ff);
  color: #ffffff;
  border: none;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.iptv-trial-button:hover {
  background: linear-gradient(to right, #0034e5, #0e31a9);
  color: #ffffff;
}
