/*
 * File: contact_page.css
 * Description: Unique and responsive styling for the TapToPDF contact form.
 * This stylesheet uses unique class names and scoped CSS variables to prevent
 * style conflicts with other pages in the application.
 */

/*
 * Scoped CSS Variables
 * These variables are now defined on the .contact-page-container
 * class, so they will only apply to elements within the contact page.
 */

 :root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --text-dark: #212529;
    --text-light: #f8f9fa;
    --bg-light: #f8f9fa;
    --bg-dark: #343a40;
    --border-color: #dee2e6;
    --shadow-color: rgba(0, 0, 0, 0.05);
}



.contact-page-container {
    --primary-color: #3b82f6; /* A clean blue for buttons and accents */
    --secondary-color: #f1f5f9; /* Light gray for backgrounds */
    --text-color-primary: #1f2937; /* Dark gray for main text */
    --text-color-secondary: #6b7280; /* Lighter gray for secondary text */
    --background-color: #f8fafc; /* Very light gray for the body */
    --card-bg-color: #ffffff; /* White for the form card */
    --border-color: #d1d5db; /* A subtle gray for borders */
    --success-color: #22c55e; /* Green for success messages */
    --error-color: #ef4444; /* Red for error messages */
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color-primary);
    line-height: 1.6;
}

/* -------------------------------------------
   Layout and Container Styling
   ------------------------------------------- */
.contact-pattern-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><circle fill="%23e2e8f0" cx="8" cy="8" r="8"/></svg>');
    background-size: 32px 32px;
    opacity: 0.2;
    z-index: -1;
}

.contact-page-container {
    min-height: 100vh;
    padding-top: 60px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-block {
    width: 100%;
    padding: 2rem 1rem;
}

.contact-block__container {
    max-width: 1200px;
    margin: 0 auto;
}

.contact-block__body {
    padding: 2rem;
}

/* -------------------------------------------
   Grid System (Responsive)
   ------------------------------------------- */
.contact-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

[class*="contact-col-"] {
    padding-left: 15px;
    padding-right: 15px;
}

/* Default styling for mobile (single column) */
.contact-col-md-12, .contact-col-lg-5, .contact-col-lg-7 {
    flex: 0 0 100%;
    max-width: 100%;
}

.contact-mt-md-5 {
    margin-top: 3rem;
}

/* Medium and large devices (tablets and desktops) */
@media (min-width: 768px) {
    .contact-mt-md-5 {
        margin-top: 0;
    }

    .contact-col-lg-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }
    .contact-col-lg-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }
}

/* -------------------------------------------
   Heading and Content Styling
   ------------------------------------------- */
.contact-super {
    margin-bottom: 2rem;
}

.contact-super__title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-super__content {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-color-secondary);
}

/* -------------------------------------------
   Card and Form Styling
   ------------------------------------------- */
.contact-card {
    background-color: var(--card-bg-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.contact-card:hover {
    box-shadow: var(--shadow-hover);
}

.contact-card__body {
    padding: 2rem;
}

.contact-form__group {
    margin-bottom: 1.5rem;
}

.contact-control-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color-secondary);
}

.contact-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-color-primary);
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.contact-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    background-color: var(--card-bg-color);
}

textarea.contact-input {
    min-height: 150px;
    resize: vertical;
}

/* Style for the select dropdown with browser compatibility fixes */
.contact-input--icon.contact-input--clip select.contact-input {
    appearance: none;
    -webkit-appearance: none; /* For Chrome, Safari, etc. */
    -moz-appearance: none;    /* For Firefox */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%236b7280" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

/* -------------------------------------------
   Button and Actions Styling
   ------------------------------------------- */
.contact-card__actions {
    text-align: right;
    margin-top: 1.5rem;
}

.contact-btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.contact-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* -------------------------------------------
   Alert and Message Styling
   ------------------------------------------- */
.contact-alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.contact-alert-success {
    background-color: var(--success-color);
    color: white;
}

.contact-alert-danger {
    background-color: var(--error-color);
    color: white;
}

/* -------------------------------------------
   Link Styling
   ------------------------------------------- */
.contact-link {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #2563eb;
}
