/* MyCard component styles - shared by view.html and admin preview */

.mc-card {
    --mc-accent: #4F8CFF;
    --mc-accent-text: #ffffff;
    position: relative;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(22, 26, 34, 0.88);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 20px;
    overflow: hidden;
    padding-bottom: 24px;
    box-shadow:
        0 16px 36px rgba(0,0,0,0.38),
        0 0 0 1px rgba(79,140,255,0.08);
    color: #ffffff;
    text-align: center;
}

.mc-banner {
    height: 96px;
    background: linear-gradient(
        135deg,
        rgba(79,140,255,0.20),
        rgba(58,111,204,0.16) 55%,
        rgba(120,146,186,0.14)
    );
    opacity: 1;
}

/* Optional company block (only rendered when logo and/or name exists) */
.mc-company-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: -42px auto 0;
    padding: 0 16px;
}

.mc-company-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: min(86%, 220px);
    text-decoration: none;
    color: inherit;
}

/* Keep logo proportional and unedited (no crop, no forced shape) */
.mc-company-logo {
    display: block;
    max-width: 100%;
    max-height: 88px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.mc-company-name {
    margin: 0;
    color: #d1d5db;
    font-size: 0.95rem;
    line-height: 1.35;
    word-break: break-word;
}

.mc-photo {
    width: 104px;
    height: 104px;
    margin: -52px auto 0;
    border-radius: 50%;
    border: 4px solid #13131a;
    background: #1f1f2e;
    color: var(--mc-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

/* When company branding exists above photo, remove overlap pull-up */
.mc-card.mc-has-company .mc-photo {
    margin-top: 12px;
}

.mc-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mc-photo .mc-icon {
    width: 48px;
    height: 48px;
}

.mc-initials {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.mc-head {
    padding: 14px 20px 0;
}

.mc-name {
    font-size: 1.6rem;
    line-height: 1.25;
    color: #ffffff;
    word-break: break-word;
}

.mc-title {
    color: #8FB5FF;
    font-weight: 600;
    margin-top: 2px;
}

.mc-company {
    color: #d1d5db;
    font-size: 0.95rem;
}

/* Centre the Save Contact button without stretching it. */
.mc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 20px 0;
}

.mc-btn {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 14px;
    font: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
    color: #e5e7eb;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    cursor: pointer;
    transition:
        background-color .2s,
        transform .2s,
        border-color .2s;
}

/* Prevent the button's SVG from rendering at its default large size. */
.mc-btn .mc-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.mc-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(168,85,247,0.5);
    transform: translateY(-1px);
}

.mc-btn-primary {
    background: #4F8CFF;
    color: #ffffff;
    border-color: #4F8CFF;
}

.mc-btn-primary:hover {
    background: #3B7BFA;
    border-color: #3B7BFA;
}

.mc-btn:focus-visible,
.mc-link:focus-visible,
.mc-social-link:focus-visible,
.mc-company-logo-wrap:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

.mc-section {
    padding: 18px 24px 0;
    text-align: left;
}

.mc-h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8FB5FF;
    margin-bottom: 6px;
}

.mc-bio {
    color: #d1d5db;
    white-space: pre-line;
    word-break: break-word;
}

.mc-links {
    list-style: none;
    padding: 16px 20px 0;
    display: grid;
    gap: 10px;
}

.mc-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    text-align: left;
    text-decoration: none;
    color: #e5e7eb;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    transition:
        border-color .2s,
        background-color .2s,
        transform .2s;
}

.mc-link:hover {
    border-color: rgba(168,85,247,0.5);
    background: rgba(255,255,255,0.08);
    transform: translateY(-1px);
}

.mc-link-icon {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4F8CFF;
    color: #ffffff;
}

.mc-link-icon .mc-icon {
    width: 20px;
    height: 20px;
}

.mc-link-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.mc-link-label {
    font-weight: 600;
    color: #e5e7eb;
}

.mc-link-sub {
    font-size: 0.85rem;
    color: #d1d5db;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mc-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 20px 20px 0;
}

.mc-social-link {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e5e7eb;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    transition:
        transform .2s,
        border-color .2s,
        color .2s;
}

.mc-social-link:hover {
    transform: translateY(-3px);
    border-color: rgba(168,85,247,0.5);
    color: #8FB5FF;
}

.mc-social-link .mc-icon {
    width: 22px;
    height: 22px;
}
