/* ============================================================
   Creet Contact Page — Frontend Styles
   ============================================================ */

/* --creet-primary-color is output by creet-store-design.
   --creet-on-primary (text contrast on primary bg) is injected per-store. */
:root { --creet-on-primary: #ffffff; }

.creet-contact {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ---- Pre-contact banner ---- */
.creet-contact-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.5;
}
.creet-contact-banner-text {
    color: #334155;
    font-weight: 600;
    flex-shrink: 0;
}
.creet-contact-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.creet-contact-banner-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0f172a;
    color: var(--creet-primary-color);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background .15s, transform .1s;
    white-space: nowrap;
}
.creet-contact-banner-pill svg {
    opacity: .7;
}
.creet-contact-banner-pill:hover {
    background: #1e293b;
    transform: translateY(-1px);
    color: var(--creet-primary-color);
    text-decoration: none;
}

/* ---- Intro ---- */
.creet-contact-intro {
    font-size: 15px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 28px;
}

/* ---- Top row: details + form ---- */
.creet-contact-top {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}
@media ( max-width: 700px ) {
    .creet-contact-top { grid-template-columns: 1fr; }
}

/* ---- Cards ---- */
.creet-contact-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px 24px;
}
.creet-contact-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 20px;
}
.creet-contact-card-title svg {
    color: #fff;
    background: #0f172a;
    padding: 5px;
    border-radius: 7px;
    box-sizing: content-box;
    flex-shrink: 0;
}

/* ---- Info list ---- */
.creet-contact-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.creet-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
}
.creet-contact-list li svg {
    margin-top: 2px;
    flex-shrink: 0;
    color: var(--creet-primary-color);
    background: #0f172a;
    padding: 4px;
    border-radius: 6px;
    box-sizing: content-box;
}
.creet-contact-list a {
    color: #0f172a;
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.creet-contact-list a:hover { color: #16a34a; }

/* ---- Socials ---- */
.creet-contact-socials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid #f1f5f9;
    padding-top: 18px;
}
.creet-contact-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    transition: background .15s, color .15s;
    text-decoration: none;
}
.creet-contact-social-link:hover {
    background: #0f172a;
    color: var(--creet-primary-color);
}

/* ---- Contact Form ---- */
.creet-contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.creet-cf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.creet-cf-field label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 5px;
}
.creet-cf-required { color: #dc2626; }
.creet-cf-optional { font-weight: 400; color: #94a3b8; font-size: 12px; }

/* Phone row */
.creet-cf-phone-row {
    display: flex;
    gap: 0;
}
.creet-cf-code-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 9px 0 0 9px;
    background: #f1f5f9;
    padding: 10px 10px;
    font-size: 13px;
    color: #0f172a;
    cursor: pointer;
    outline: none;
    flex-shrink: 0;
    max-width: 130px;
    transition: border-color .15s;
    font-family: inherit;
}
[dir="rtl"] .creet-cf-code-select {
    border-radius: 0 9px 9px 0;
    border-right-width: 1.5px;
    border-left-width: 0;
}
[dir="ltr"] .creet-cf-code-select {
    border-right-width: 0;
}
.creet-cf-code-select:focus { border-color: #0f172a; }
.creet-cf-phone-input {
    border-radius: 0 9px 9px 0 !important;
    flex: 1;
}
[dir="rtl"] .creet-cf-phone-input {
    border-radius: 9px 0 0 9px !important;
}

/* Inputs */
.creet-cf-input,
.creet-cf-textarea {
    width: 100%;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    padding: 10px 14px;
    font-size: 14px;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    font-family: inherit;
    outline: none;
}
.creet-cf-input:focus,
.creet-cf-textarea:focus,
.creet-cf-code-select:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15,23,42,.07);
    background: #fff;
}
.creet-cf-textarea { resize: vertical; }

/* ---- Attachment ---- */
.creet-cf-attachment-field {
    margin-top: 4px;
}
.creet-cf-file-input {
    display: none;
}
.creet-cf-attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px dashed #cbd5e1;
    border-radius: 9px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: border-color .15s, color .15s, background .15s;
    background: #f8fafc;
    width: fit-content;
}
.creet-cf-attach-btn:hover {
    border-color: #0f172a;
    color: #0f172a;
    background: #f1f5f9;
}
.creet-cf-attach-btn svg { flex-shrink: 0; }
.creet-cf-attach-hint {
    font-size: 11px;
    color: #94a3b8;
    margin: 5px 0 0;
}
.creet-cf-file-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    color: #166534;
    margin-top: 8px;
    font-weight: 500;
}
.creet-cf-file-preview svg { flex-shrink: 0; }
.creet-cf-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creet-cf-file-remove {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
}
.creet-cf-file-remove:hover { color: #b91c1c; }

/* ---- Alert ---- */
.creet-cf-alert {
    padding: 12px 16px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
}
.creet-cf-alert--success {
    background: #ecfdf5;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}
.creet-cf-alert--error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* ---- Submit ---- */
.creet-cf-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0f172a;
    color: var(--creet-primary-color);
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .1s;
    width: 100%;
    margin-top: 8px;
}
.creet-cf-submit:hover { background: #1e293b; }
.creet-cf-submit:active { transform: scale(.98); }
.creet-cf-submit:disabled { opacity: .6; cursor: not-allowed; }

/* ---- Map ---- */
.creet-contact-map {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}
.creet-contact-map iframe { display: block; }

/* ---- Legal Pages ---- */
.creet-legal-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #0f172a;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 0;
}

.creet-legal-page-header {
    background: linear-gradient(135deg, #000, #1a1a2e, #16213e);
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 18px;
}

.creet-legal-page-header h1 {
    margin: 0;
    color: var(--creet-primary-color);
    font-size: 28px;
    line-height: 1.25;
    font-weight: 800;
}

.creet-legal-page-content {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 26px;
    line-height: 1.9;
    font-size: 15px;
}

.creet-legal-page-content h2,
.creet-legal-page-content h3,
.creet-legal-page-content h4 {
    color: var(--creet-legal-secondary, #334155);
    margin-top: 22px;
    margin-bottom: 10px;
}

.creet-legal-page-content a {
    color: var(--creet-legal-primary, #0f172a);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.creet-legal-page-content ul,
.creet-legal-page-content ol {
    padding-inline-start: 22px;
}

@media (max-width: 782px) {
    .creet-legal-page {
        padding: 10px 0;
    }

    .creet-legal-page-header {
        padding: 18px 16px;
    }

    .creet-legal-page-header h1 {
        font-size: 22px;
    }

    .creet-legal-page-content {
        padding: 18px 14px;
        font-size: 14px;
    }
}
