/* Footer Component Styles
 * Shared across all 10 language footers on www.thios.co
 * Includes: social icons, newsletter, support, feedback modal, canvas wrapper */

/* ── Font Awesome Brands fix ── */
.social-icons .fab,
.social-icons .social-icon i {
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased;
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", sans-serif !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 2.5rem !important;
}

/* ── Section containers ── */
.social-media-section,
.newsletter-signup-section,
.support-section {
    max-width: min(800px, 90vw);
    margin: 2rem auto;
    padding: 3rem 2rem;
    background: #ffffff;
    border-radius: 16px;
    border: 2px dashed #15635E;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    box-sizing: border-box;
}

.social-media-section:hover,
.newsletter-signup-section:hover,
.support-section:hover {
    border-style: solid;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    background: #fcfdfd;
}

.social-media-section h3,
.newsletter-signup-section h3,
.support-section h3 {
    color: #15635E;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ── Social icons ── */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-icon {
    font-size: 2.5rem;
    color: #15635E;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon:hover { transform: scale(1.2); }
.social-icon[title*="Discord"]:hover { color: #5865F2; }
.social-icon[title*="GitHub"]:hover { color: #333; }
.social-icon[title*="YouTube"]:hover { color: #FF0000; }
.social-icon[title*="Instagram"]:hover { color: #E4405F; }
.social-icon[title*="Reddit"]:hover { color: #FF4500; }
.social-icon[title*="LinkedIn"]:hover { color: #0A66C2; }
.social-icon[title*="X"]:hover { color: #000000; }

/* ── Footer links ── */
.footerlink {
    color: #15635E;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.footerlink:hover {
    color: #0f4a47 !important;
    text-decoration: underline;
    transform: translateX(4px);
    display: inline-block;
}

/* ── Newsletter form ── */
.newsletter-content {
    text-align: center;
}

.newsletter-text p {
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-form-compact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form-compact input[type="email"],
.newsletter-form-compact input[type="text"] {
    max-width: 100%;
    box-sizing: border-box;
}

.form-group-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-compact input {
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-group-compact input:focus {
    outline: none;
    border-color: #15635E;
    box-shadow: 0 0 0 3px rgba(21, 99, 94, 0.1);
}

.form-group-compact input.success { border-color: #28a745; }
.form-group-compact input.error { border-color: #dc3545; }

.checkbox-group-compact {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-label-compact {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.4;
    text-align: left;
}

.checkbox-label-compact input[type="checkbox"] {
    margin: 0;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.checkbox-text-compact {
    flex: 1;
    font-size: 0.85rem;
}

.btn-newsletter-compact {
    background: #15635E;
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    width: 100%;
}

.btn-newsletter-compact:hover { background: #0f4a47; }
.btn-newsletter-compact:disabled { background: #6c757d; cursor: not-allowed; }

.btn-loading { display: none; }

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.field-error.show { display: block; }

.success-message,
.error-message {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: block !important;
}

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

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

.privacy-note-compact {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6c757d;
    line-height: 1.5;
}

.privacy-note-compact a { color: #15635E; text-decoration: none; }
.privacy-note-compact a:hover { text-decoration: underline; }

/* ── Support section ── */
.support-content {
    text-align: center;
    padding: 0 1rem;
}

.support-text p {
    margin-bottom: 2rem;
    line-height: 1.6;
    color: #6c757d;
    font-size: 1rem;
}

.support-cta { margin-top: 1.5rem; }

.support-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #15635E;
    color: white;
    text-decoration: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.support-button:hover { background: #0f4a47; color: white; text-decoration: none; }
.support-button:active { background: #0a3d3a; }
.support-icon { font-size: 1.1rem; }

/* ── Feedback button & modal ── */
.feedback-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 20px 0;
}

.feedback-button {
    background: linear-gradient(135deg, #15635E, #1a7a73);
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(21, 99, 94, 0.3);
    position: relative;
    overflow: hidden;
}

.feedback-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(21, 99, 94, 0.4);
    background: linear-gradient(135deg, #1a7a73, #15635E);
}

.feedback-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(21, 99, 94, 0.3);
}

.feedback-icon {
    font-size: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-text {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feedback-button.morphing {
    animation: morph 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes morph {
    0%   { transform: scale(1);    border-radius: 50px; }
    25%  { transform: scale(0.95); border-radius: 40px; }
    50%  { transform: scale(1.05); border-radius: 60px; }
    75%  { transform: scale(0.98); border-radius: 45px; }
    100% { transform: scale(1);    border-radius: 50px; }
}

.feedback-button.morphing .feedback-icon {
    animation: iconSpin 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes iconSpin {
    0%   { transform: rotate(0deg)   scale(1);   }
    25%  { transform: rotate(90deg)  scale(1.2); }
    50%  { transform: rotate(180deg) scale(0.8); }
    75%  { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1);   }
}

.feedback-button.morphing .feedback-text {
    animation: textPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes textPulse {
    0%   { opacity: 1;   }
    25%  { opacity: 0.7; }
    50%  { opacity: 0.5; }
    75%  { opacity: 0.8; }
    100% { opacity: 1;   }
}

.feedback-button.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    animation: successPulse 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes successPulse {
    0%   { transform: scale(1);   }
    50%  { transform: scale(1.1); }
    100% { transform: scale(1);   }
}

.feedback-button.success .feedback-icon { content: ""; }
.feedback-button.success .feedback-text { content: "Thanks!"; }

.feedback-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease-out;
}

.feedback-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.feedback-modal-header h3 {
    margin: 0;
    color: #15635E;
    font-size: 20px;
    font-weight: 600;
}

.feedback-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.feedback-form { padding: 24px; }
.feedback-form-group { margin-bottom: 20px; }

.feedback-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.feedback-form-group input,
.feedback-form-group select,
.feedback-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.feedback-form-group input:focus,
.feedback-form-group select:focus,
.feedback-form-group textarea:focus {
    outline: none;
    border-color: #15635E;
    box-shadow: 0 0 0 3px rgba(21, 99, 94, 0.1);
}

.feedback-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.feedback-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.feedback-cancel,
.feedback-submit {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.feedback-cancel { background-color: #f3f4f6; color: #374151; }
.feedback-cancel:hover { background-color: #e5e7eb; }

.feedback-submit {
    background: linear-gradient(135deg, #15635E, #1a7a73);
    color: white;
}

.feedback-submit:hover {
    background: linear-gradient(135deg, #1a7a73, #15635E);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(21, 99, 94, 0.3);
}

.feedback-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Dark mode ── */
[data-theme="dark"] .feedback-modal-content { background: #1f2937; color: #f9fafb; }
[data-theme="dark"] .feedback-modal-header { border-bottom-color: #374151; }
[data-theme="dark"] .feedback-modal-header h3 { color: #10b981; }
[data-theme="dark"] .feedback-close { color: #9ca3af; }
[data-theme="dark"] .feedback-close:hover { background-color: #374151; color: #f3f4f6; }
[data-theme="dark"] .feedback-form-group label { color: #f3f4f6; }
[data-theme="dark"] .feedback-form-group input,
[data-theme="dark"] .feedback-form-group select,
[data-theme="dark"] .feedback-form-group textarea { background-color: #374151; border-color: #4b5563; color: #f9fafb; }
[data-theme="dark"] .feedback-form-group input:focus,
[data-theme="dark"] .feedback-form-group select:focus,
[data-theme="dark"] .feedback-form-group textarea:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }
[data-theme="dark"] .feedback-cancel { background-color: #374151; color: #f3f4f6; }
[data-theme="dark"] .feedback-cancel:hover { background-color: #4b5563; }

/* ── Footer canvas wrapper ── */
#fc-wrap { position: relative; width: 100%; height: 300px; overflow: hidden; margin-top: 3rem; }

/* ── Responsive ── */
@media (max-width: 1024px) and (min-width: 901px) {
    .support-section { max-width: min(800px, 85vw); }
}

@media (max-width: 900px) and (min-width: 769px) {
    .support-section { max-width: min(800px, 80vw); }
}

@media (max-width: 768px) {
    .footer-grid-container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem !important;
    }
    .support-section { max-width: 95vw; padding: 1.5rem 1rem; }
    .support-content { padding: 0 0.5rem; }
    .support-text p { font-size: 0.95rem; margin-bottom: 1.5rem; }
    .support-button { padding: 0.65rem 1.5rem; font-size: 0.95rem; }
    .newsletter-signup-section { padding: 2rem 0; }
    .newsletter-text h2 { font-size: 1.5rem; }
    .newsletter-text p { font-size: 1rem; }
    .newsletter-form-compact { max-width: 100%; }
    #fc-wrap { height: 200px; }
}

@media (max-width: 640px) {
    .social-media-section,
    .newsletter-signup-section,
    .support-section {
        padding: 1.5rem 1rem;
        margin: 1.5rem auto;
        max-width: calc(100vw - 2rem);
    }
    .newsletter-signup-section h3 { font-size: 1.25rem; margin-bottom: 1rem; }
    .newsletter-text p { font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .footer-grid-container {
        grid-template-columns: 1fr !important;
        text-align: left !important;
    }
    #fc-wrap { height: 150px; }
}
