/**
 * PCES Contact Us Page Styles
 * Based on Figma design specifications
 */

/* Main Container */
.pces-contact-us-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 20px; /* Add some default padding */
}

/* Adjust padding for mobile view */
@media (max-width: 767.98px) {
    .pces-contact-us-page {
        padding-top: 80px; /* Add more space for fixed navbar */
    }
}

/* Contact Information Section */
.contact-info-section {
    padding-right: 2rem;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.contact-description p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.contact-details {
    margin: 2rem 0;
}

.contact-email,
.contact-phone {
    font-size: 1.1rem;
    font-weight: 500;
}

.contact-email a,
.contact-phone a {
    color: #1a1a1a !important;
    text-decoration: none;
}

.contact-email a:hover,
.contact-phone a:hover {
    color: #007bff !important;
}

/* Feedback Section */
.feedback-section {
    margin-top: 3rem;
}

.feedback-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a90e2;
    margin-bottom: 1rem;
}

.feedback-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.7;
}

/* Contact Form Section */
.contact-form-section {
    background: linear-gradient(135deg, #D1E5EB 0%, #94c2d0 100%);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.form-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
}

/* Floating Label Form Group */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
    width: 100%;
}

/* Adjust for input groups with floating labels */
.form-group .input-group {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.form-group label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: #666;
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    background: #d1e5eb;
    padding: 0 5px;
    margin-left: -5px;
    border-radius: 4px;
}

.form-group.focused label,
.form-group.has-value label {
    top: -10px;
    left: 10px;
    font-size: 0.85rem;
    color: #3032c5;
    background: #d1e5eb;
    padding: 0 5px;
}

/* Special case for input group labels */
.form-group .input-group + label {
    left: 15px;
    z-index: 5; /* Ensure label appears above the input group */
}

/* Adjust label positioning for input groups */
.form-group .input-group ~ label {
    left: 110px; /* Account for country code selector width */
}

.form-group .input-group ~ label.focused,
.form-group .input-group ~ label.has-value {
    left: 15px;
}

/* Textarea specific styles */
.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Ensure proper z-index for input group elements */
.form-group .input-group .form-control {
    position: relative;
    z-index: 1;
}

/* Form Styling */
.contact-form .form-control,
.contact-form .form-select {
    border: 2px solid #d1e5eb;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    background-color: #d1e5eb;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
    background-color: #fff;
}

.contact-form .form-control::placeholder {
    color: #999;
    font-weight: 400;
}

/* Input Group Styling */
.contact-form .input-group-text {
    background-color: #d1e5eb;
    border: 2px solid #3032c5;
    border-right: none;
    border-radius: 12px 0 0 12px;
    color: #666;
}

/* Form Container */
.contact-form {
    background-color: #d1e5eb;
    padding: 2rem;
    border-radius: 12px;
}

/* Form Controls Styling */
.contact-form .form-control,
.contact-form .form-select,
.contact-form textarea {
    border: 2px solid #3f85c3;
    border-radius: 12px;
    padding: 10px 15px;
    background-color: #d1e5eb;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

/* Form controls */
.contact-form .form-control:focus,
.contact-form .form-select:focus,
.contact-form textarea:focus {
    border-color: #3f85c3;
    box-shadow: 0 0 0 0.25rem rgba(3, 4, 94, 0.25);
    outline: none;
}

/* Textarea Specific */
.contact-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Character Count */
.character-count {
    font-weight: 500;
    color: #666;
}

/* Terms and Conditions Toggle Switch */
.terms-toggle-container {
    margin: 1.5rem 0;
    padding: 0.5rem 0;
}

.terms-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin: 0 8px 0 0;
    flex-shrink: 0;
}

.terms-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.terms-label {
    cursor: pointer;
    user-select: none;
    margin: 0;
    line-height: 1.4;
    padding-top: 2px;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3032c5;
}

input:focus + .slider {
    box-shadow: 0 0 1px #3032c5;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Error state for terms when form is submitted without agreement */
.ng-submitted input.ng-invalid + .slider {
    border: 1px solid #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.ng-submitted input.ng-invalid ~ .terms-label {
    color: #dc3545;
}

/* Hover effect */
.terms-toggle:hover input:not(:checked) + .slider {
    background-color: #b3b3b3;
}

.terms-toggle:hover input:checked + .slider {
    background-color: #1a1d7a;
    opacity: 0.9;
}

/* Submit Button */
.contact-form .btn-primary {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    color: #ffffff !important; /* Force white text */
}

.contact-form .btn-primary:hover {
    background: linear-gradient(135deg, #357abd 0%, #2c5aa0 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.contact-form .btn-primary:active {
    transform: translateY(0);
}

/* Form Footer */
.form-footer {
    margin-top: 1.5rem;
}

.form-footer a {
    color: #4a90e2;
    font-weight: 500;
}

.form-footer a:hover {
    color: #357abd;
    text-decoration: underline !important;
}

/* Alert Styling */
.contact-form .alert {
    border-radius: 12px;
    border: none;
    margin-bottom: 1.5rem;
}

.contact-form .alert-success {
    background-color: #d4edda;
    color: #155724;
}

.contact-form .alert-danger {
    background-color: #f8d7da;
    color: #1c5c72;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .contact-info-section {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .contact-title {
        font-size: 2rem;
    }
    
    .contact-form-section {
        padding: 2rem;
    }
}

@media (max-width: 767.98px) {
    .contact-title {
        font-size: 1.75rem;
    }
    
    .contact-form-section {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .contact-form .form-control,
    .contact-form .form-select {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .contact-form .btn-primary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animation for form elements */
.contact-form .form-control,
.contact-form .form-select,
.contact-form .btn-primary {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Focus states for accessibility */
.contact-form .form-control:focus,
.contact-form .form-select:focus,
.contact-form .btn-primary:focus {
    outline: 2px solid #4a90e2;
    outline-offset: 2px;
}

/* Loading state for submit button */
.contact-form .btn-primary.loading {
    position: relative;
    color: transparent;
}

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