/* ============================================================================
   CONTACT FORM STYLES - Unified styling for both index and gallery pages
   Version: 2025-10-29
   ============================================================================ */

/* Contact Modal */
#contactModal .modal-content {
    background: linear-gradient(135deg, #3a5264 0%, #2c3e50 100%);
    border: 3px solid #FF6B00;
    border-radius: 12px;
}

/* Contact Section - Header and Email Link */
.contact-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin-bottom: 20px !important;
}

.contact-section h2 {
    color: #FFA500 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
    margin: 0 auto 10px auto !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #FFA500 !important;
    display: inline-block !important;
    font-weight: bold !important;
}

.contact-section p {
    margin: 5px auto !important;
    color: #ffffff !important;
}

.contact-section a {
    color: #FFA500 !important;
    font-weight: bold !important;
    text-decoration: underline !important;
}

.contact-section a:hover {
    color: #FFD700 !important;
    text-decoration: underline !important;
}

/* Form Labels */
#projectContactForm label {
    display: block !important;
    margin-bottom: 5px !important;
    margin-top: 10px !important;
    color: #FFA500 !important;
    font-weight: bold !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5) !important;
}

/* Form Inputs */
#projectContactForm input[type="text"],
#projectContactForm input[type="tel"],
#projectContactForm input[type="email"],
#projectContactForm input[type="number"],
#projectContactForm textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important;
    margin-bottom: 15px !important;
    border: 3px solid #FF6B00 !important;
    background-color: rgba(100, 130, 150, 0.5) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2) !important;
}

#projectContactForm input:focus,
#projectContactForm textarea:focus {
    outline: none !important;
    border-color: #FFA500 !important;
    border-width: 4px !important;
    background-color: rgba(120, 150, 170, 0.6) !important;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.5) !important;
}

#projectContactForm textarea {
    min-height: 120px !important;
    resize: vertical !important;
}

#projectContactForm input::placeholder,
#projectContactForm textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* CAPTCHA Section */
#captcha-section {
    margin: 15px 0 !important;
    padding: 10px !important;
    border: 2px solid #FF6B00 !important;
    border-radius: 5px !important;
    background-color: rgba(58, 82, 100, 0.3) !important;
}

#captcha-section label {
    color: #FFA500 !important;
    font-weight: bold !important;
    margin-bottom: 8px !important;
}

#captcha-section input {
    margin-top: 8px !important;
}

#captcha-section button,
#refresh-captcha {
    margin-top: 8px !important;
    padding: 6px 12px !important;
    background: linear-gradient(135deg, #FF6B00 0%, #FFA500 100%) !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 14px !important;
}

#captcha-section button:hover,
#refresh-captcha:hover {
    background: linear-gradient(135deg, #e65c00 0%, #ff9500 100%) !important;
}

/* File Upload Button - CRITICAL: Must override all label styles */
#projectContactForm label.custom-file-upload,
#contactModal label[for="attachment"],
label.custom-file-upload {
    padding: 8px 12px !important;
    background-color: #e0e0e0 !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    text-align: center !important;
    display: inline-block !important;
    max-width: 90px !important;
    min-width: 70px !important;
    white-space: nowrap !important;
    text-shadow: none !important;
    margin-bottom: 10px !important;
    margin-top: 5px !important;
    font-weight: normal !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
}

#projectContactForm label.custom-file-upload:hover,
#contactModal label[for="attachment"]:hover,
label.custom-file-upload:hover {
    background-color: #ffd633 !important;
    color: #000000 !important;
    transform: translateY(-1px) !important;
}

/* File Input - Keep Hidden */
#projectContactForm input[type="file"],
#attachment {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    border: 0 !important;
}

/* File Size and Type Info */
#totalSize {
    display: block !important;
    margin: 10px 0 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #5FD35F !important;
    transition: color 0.3s ease !important;
}

.file-types-info {
    font-size: 13px !important;
    color: #FFA500 !important;
    margin-bottom: 10px !important;
    font-style: italic !important;
}

/* File List Display */
#fileList {
    margin: 10px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.file-detail {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 14px !important;
    padding: 8px 12px !important;
    background-color: rgba(58, 82, 100, 0.3) !important;
    color: #ffffff !important;
    border: 2px solid #FF6B00 !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.file-detail:hover {
    background-color: rgba(80, 110, 130, 0.4) !important;
    border-color: #FFA500 !important;
}

.file-name {
    flex: 1 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin-right: 10px !important;
    font-weight: 500 !important;
}

.file-size {
    color: #FFA500 !important;
    font-weight: bold !important;
    margin-right: 10px !important;
    white-space: nowrap !important;
}

.remove-file {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
}

.remove-file:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4) !important;
}

/* Submit Button */
#submitContactForm {
    padding: 12px 30px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    background: linear-gradient(135deg, #FF6B00 0%, #FFA500 100%) !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3) !important;
    box-shadow: 0 3px 10px rgba(255, 107, 0, 0.3) !important;
    margin-top: 10px !important;
    width: 100% !important;
}

#submitContactForm:hover {
    background: linear-gradient(135deg, #e65c00 0%, #ff9500 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.5) !important;
    border-color: #FFD700 !important;
}

#submitContactForm:active {
    transform: translateY(0) !important;
}

/* Honeypot Fields - MUST BE HIDDEN */
.honeypot-fields,
#projectContactForm input[name="website"],
#projectContactForm input[name="url"],
#projectContactForm input[name="homepage"] {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    z-index: -1 !important;
    opacity: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Mobile Responsive */
@media only screen and (max-width: 768px) {
    #contactModal .modal-content {
        width: 95% !important;
        padding: 15px !important;
    }
    
    #projectContactForm input,
    #projectContactForm textarea {
        font-size: 16px !important;
    }
    
    #submitContactForm {
        font-size: 18px !important;
        padding: 14px !important;
    }
}

@media only screen and (max-width: 600px) {
    label.custom-file-upload,
    #contactModal label[for="attachment"] {
        width: 100% !important;
        max-width: 100% !important;
    }
}
