/* Contact Section Specific Styles - HPE Themed */

/* Mobile-first responsive grid for form */
.mw-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Form groups with proper HPE spacing */
.form-group {
    margin-bottom: 0;
}

.form-group.full {
    grid-column: 1 / -1;
}

.mw-field-note {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.6;
    color: #67686e;
}

.mw-service-selector {
    margin: 0;
    padding: 0;
    border: 0;
}

.mw-service-selector__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.mw-service-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #d9e1e3;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.mw-service-option:hover {
    border-color: #b7c5cb;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.mw-service-option--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.mw-service-option--disabled:hover {
    border-color: #d9e1e3;
    box-shadow: none;
    transform: none;
}

.mw-service-option input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.mw-service-option__content {
    display: grid;
    gap: 6px;
}

.mw-service-option__title {
    font-family: "Metric Semibold", Arial, sans-serif;
    color: #292d3a;
    line-height: 1.4;
}

.mw-service-option__description {
    font-size: 14px;
    line-height: 1.55;
    color: #67686e;
}

.mw-service-area-section {
    margin-top: 6px;
    padding: 18px;
    background: #f8faf9;
    border: 1px solid #dce4e5;
    border-radius: 10px;
}

.mw-service-area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.mw-service-area-item {
    padding: 14px;
    border: 1px solid #e4eaec;
    border-radius: 8px;
    background: #ffffff;
}

.mw-service-area-item__note {
    margin-top: 8px;
}

/* Better mobile form input sizing */
.form-input,
.form-select {
    width: 100%;
    box-sizing: border-box;
    font-size: 16px; /* Prevents iOS zoom on focus */
}

/* Date input specific styling */
input[type="date"].form-input {
    min-height: 44px; /* Better touch target */
    padding: 10px 12px;
    position: relative;
    padding-right: 40px; /* Space for clear button */
}

/* Date input container */
.form-group:has(input[type="date"]) {
    position: relative;
}

/* Date clear button */
.date-clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.date-clear-btn:hover {
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
}

/* Mobile date picker improvements */
@media (max-width: 480px) {
    input[type="date"].form-input {
        min-height: 48px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .date-clear-btn {
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 22px;
    }

    .mw-service-selector__grid,
    .mw-service-area-grid {
        grid-template-columns: 1fr;
    }
}

/* File input styling to match HPE */
input[type="file"] {
    width: 100%;
    padding: 10px 0;
    font-family: "Metric Light", Arial, sans-serif;
    font-size: 14px;
    color: var(--typo-text-color, #67686e);
}

input[type="file"]::-webkit-file-upload-button {
    background: #01a982;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-family: "Metric Semibold", Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    margin-right: 12px;
    transition: background-color 0.2s;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background: #068667;
}

input[type="file"]::file-selector-button {
    background: #01a982;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-family: "Metric Semibold", Arial, sans-serif;
    font-size: 14px;
    cursor: pointer;
    margin-right: 12px;
    transition: background-color 0.2s;
}

input[type="file"]::file-selector-button:hover {
    background: #068667;
}

/* Upload section styles - HPE Themed */
.upload-section {
    margin: 24px 0;
    padding: 24px;
    background: #f7f7f7;
    border-radius: 8px;
    border: 2px dashed #c6c9ca;
    transition: all 0.2s ease;
}

.upload-section.drag-over {
    border-color: #01a982;
    background: #e8f4fd;
    border-style: solid;
}

.upload-instructions {
    text-align: center;
    margin-bottom: 20px;
}

.upload-instructions p {
    margin: 0 0 10px 0;
    color: var(--typo-text-color, #67686e);
    font-size: 15px;
    line-height: 1.5;
}

.upload-instructions .file-types {
    font-size: 13px;
    color: #888;
    font-family: "Metric Light", Arial, sans-serif;
}

.upload-desktop-hint {
    margin-top: 6px;
    font-size: 13px;
    color: #292d3a;
}

.upload-instructions strong {
    color: var(--typo-heading-color, #292d3a);
    font-family: "Metric Semibold", Arial, sans-serif;
}

.upload-input-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.upload-label {
    margin-bottom: 0;
    display: inline-block;
    width: auto;
    cursor: pointer;
    background: #01a982;
    color: #fff;
    border-radius: 4px;
    padding: 8px 16px;
    font-family: "Metric Semibold", Arial, sans-serif;
    font-size: 14px;
    transition: background-color 0.2s;
}

.upload-label:hover {
    background: #068667;
}

.upload-native-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mw-form-actions .cta {
    box-sizing: border-box;
    max-width: 100%;
}

.mw-form-actions .icon.arrow-up-icon::before {
    content: "↑";
    font-weight: 700;
}

/* File upload feedback */
.file-count-feedback {
    margin-top: 12px;
    font-size: 14px;
    color: var(--typo-text-color, #67686e);
    padding: 10px 14px;
    background: #f0f0f0;
    border-radius: 6px;
    display: inline-block;
    border-left: 4px solid #01a982;
    font-family: "Metric Light", Arial, sans-serif;
}

/* Upload progress - HPE Themed */
.upload-progress {
    background: #e8f4fd;
    border: 1px solid #b6d4fe;
    border-radius: 6px;
    padding: 20px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: fadeIn 0.3s ease;
}

.upload-progress.hidden {
    display: none;
}

.upload-progress .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #01a982;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.upload-progress-text {
    flex: 1;
    font-size: 15px;
    color: var(--typo-heading-color, #292d3a);
    line-height: 1.5;
}

.upload-progress-text strong {
    color: #01a982;
    font-family: "Metric Semibold", Arial, sans-serif;
}

/* File preview - HPE Themed */
.file-preview-container {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}

.file-preview {
    position: relative;
    border: 1px solid #e9e9e9;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.file-preview:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    border-color: #01a982;
}

.file-preview img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.file-preview-info {
    padding: 10px;
    font-size: 12px;
    color: var(--typo-text-color, #67686e);
    text-align: center;
    word-break: break-all;
    font-family: "Metric Light", Arial, sans-serif;
    line-height: 1.4;
}

.remove-file {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.remove-file:hover {
    opacity: 1;
    transform: scale(1.1);
    background: #ff3333;
}

/* Form validation - HPE Themed */
.form-group.required label::after {
    content: " *";
    color: #ff4d4f;
    font-weight: bold;
}

.form-group.required legend.form-label::after {
    content: " *";
    color: #ff4d4f;
    font-weight: bold;
}

.form-input.error {
    border-color: #ff4d4f;
    background-color: #fff8f8;
}

.form-input.success {
    border-color: #52c41a;
    background-color: #f6ffed;
}

.validation-error {
    color: #ff4d4f;
    font-size: 13px;
    margin-top: 6px;
    display: block;
    font-family: "Metric Light", Arial, sans-serif;
}

.validation-success {
    color: #52c41a;
    font-size: 13px;
    margin-top: 6px;
    display: block;
    font-family: "Metric Light", Arial, sans-serif;
}

/* Status messages - HPE Themed */
.mw-status {
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 8px;
    font-weight: 500;
    font-family: "Metric Semibold", Arial, sans-serif;
    animation: fadeIn 0.3s ease;
    border-left: 4px solid;
}

.mw-status.success {
    background: #dff7ef;
    color: #05603a;
    border-color: #9ce7cc;
}

.mw-status.error {
    background: #fde9e9;
    color: #8a1f1f;
    border-color: #f5b5b5;
}

.upload-status {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 15px;
    animation: fadeIn 0.3s ease;
    border-left: 4px solid;
}

.upload-status.success {
    background: #dff7ef;
    color: #05603a;
    border-color: #9ce7cc;
}

.upload-status.error {
    background: #fde9e9;
    color: #8a1f1f;
    border-color: #f5b5b5;
}

.upload-status.info {
    background: #e8f4fd;
    color: #084298;
    border-color: #b6d4fe;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile-first responsive adjustments */
@media (max-width: 768px) {
    /* Form grid becomes single column on tablets */
    .mw-form-grid {
        gap: 16px;
    }
    
    /* Card padding reduction */
    .mw-card {
        padding: 20px;
    }
    
    /* Upload section adjustments */
    .upload-section {
        padding: 20px;
        margin: 20px 0;
    }
    
    .upload-instructions p {
        font-size: 14px;
    }
    
    .upload-instructions .file-types {
        font-size: 12px;
    }

    /* File preview grid */
    .file-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .file-preview img {
        height: 100px;
    }
    
    .file-preview-info {
        font-size: 11px;
        padding: 8px;
    }
    
    /* Upload progress */
    .upload-progress {
        padding: 16px;
        gap: 12px;
    }
    
    .upload-progress .spinner {
        width: 20px;
        height: 20px;
    }
    
    .upload-progress-text {
        font-size: 14px;
    }
    
    /* Form actions button layout */
    .mw-form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .mw-form-actions .cta {
        width: 100%;
        justify-content: center;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 480px) {
    /* Mobile phone optimizations */
    .mw-container {
        padding: 0 16px;
    }
    
    .mw-section {
        padding: 32px 0;
    }
    
    .mw-card {
        padding: 16px;
        border-radius: 6px;
    }
    
    /* Form elements */
    .form-input,
    .form-select,
    textarea.form-input {
        padding: 12px;
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    input[type="date"].form-input {
        min-height: 48px;
    }
    
    /* Upload section */
    .upload-section {
        padding: 16px;
        margin: 16px 0;
    }
    
    .upload-instructions p {
        font-size: 13px;
        line-height: 1.4;
    }

    .upload-desktop-hint {
        display: none;
    }

    .upload-input-row {
        gap: 8px;
    }
    
    /* File preview grid */
    .file-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }
    
    .file-preview img {
        height: 85px;
    }
    
    .file-preview-info {
        font-size: 10px;
        padding: 6px;
    }
    
    .remove-file {
        width: 22px;
        height: 22px;
        font-size: 13px;
        top: 4px;
        right: 4px;
    }
    
    /* Upload progress */
    .upload-progress {
        padding: 14px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .upload-progress .spinner {
        width: 22px;
        height: 22px;
    }
    
    .upload-progress-text {
        font-size: 13px;
    }
    
    /* Status messages */
    .mw-status,
    .upload-status {
        padding: 14px;
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    /* File count feedback */
    .file-count-feedback {
        font-size: 13px;
        padding: 8px 12px;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }
    
    /* Better touch targets */
    .form-label {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .mw-form-actions .cta {
        min-height: 44px;
        white-space: normal;
    }
    
    input[type="file"]::-webkit-file-upload-button,
    input[type="file"]::file-selector-button {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px; /* Minimum touch target size */
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .file-preview-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .file-preview img {
        height: 75px;
    }
    
    .upload-instructions p {
        font-size: 12px;
    }
    
    .form-input,
    .form-select {
        font-size: 15px;
    }
}

/* Prevent horizontal scrolling on mobile */
@media (max-width: 480px) {
    .mw-container,
    .mw-card,
    .upload-section,
    .file-preview-container {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    input, select, textarea, button {
        max-width: 100%;
    }
}
