@import url('https://fonts.googleapis.com/css2?family=Albert+Sans:wght@600;700;800&family=Funnel+Sans:wght@400;500;600;700&display=swap');

.dcm-wrap,
.dcm-public-main {
    font-family: 'Funnel Sans', Arial, sans-serif;
    background: #fefefe;
    color: #000;
}

.dcm-wrap h1,
.dcm-wrap h2,
.dcm-wrap h3,
.dcm-public-main h1,
.dcm-public-main h2,
.dcm-public-main h3 {
    font-family: 'Albert Sans', Arial, sans-serif;
    color: #f90001;
    line-height: 1.15;
}

.dcm-card,
.dcm-card-public-inner {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 28px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.07);
}

.dcm-card {
    max-width: 1040px;
    margin: 0 auto;
    padding: 34px;
}

.dcm-narrow {
    max-width: 480px;
}

.dcm-step {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding: 24px 0;
}

.dcm-grid {
    display: grid;
    gap: 18px;
    align-items: start;
}

.dcm-grid.two,
.dcm-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dcm-dashboard-grid {
    display: grid;
    gap: 18px;
}

.dcm-dashboard-grid > div {
    background: #fefefe;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 22px;
}

.dcm-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-items: stretch;
    justify-content: flex-start;
    font-weight: 700;
}

.dcm-form input,
.dcm-form textarea,
#loginform input[type="text"],
#loginform input[type="password"] {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
}


.dcm-colour-row {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
}

.dcm-form input[type="color"].dcm-colour-picker {
    min-height: 48px;
    padding: 4px;
    cursor: pointer;
}

.dcm-hex-input {
    text-transform: uppercase;
}

.dcm-step-description {
    margin: -8px 0 18px;
    color: rgba(0, 0, 0, 0.72);
    font-size: 15px;
    line-height: 1.6;
}

.dcm-radio {
    display: block;
    margin: 10px 0;
}

.dcm-button,
#wp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f90001;
    color: #fff !important;
    border: 0;
    border-radius: 999px;
    padding: 13px 24px;
    font-weight: 800;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dcm-button:hover,
#wp-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dcm-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dcm-field-note,
.dcm-small {
    color: rgba(0, 0, 0, 0.68);
    font-size: 14px;
}

.dcm-public-main {
    min-height: 70vh;
    padding: 42px 18px;
}

.dcm-card-public {
    max-width: 520px;
    margin: 0 auto;
}

.dcm-card-public-inner {
    padding: 34px;
    text-align: center;
}

.dcm-public-logo {
    max-width: 110px;
    max-height: 90px;
    object-fit: contain;
    margin: 0 auto 18px;
    display: block;
}

.dcm-public-photo,
.dcm-public-initials {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dcm-public-photo {
    object-fit: cover;
}

.dcm-public-initials {
    background: var(--dcm-theme, #f90001);
    color: #fff;
    font-family: 'Albert Sans', Arial, sans-serif;
    font-size: 42px;
    font-weight: 800;
}

.dcm-public-title,
.dcm-public-company {
    margin: 6px 0;
}

.dcm-public-actions,
.dcm-public-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

.dcm-public-address {
    margin: 22px 0 0;
    padding: 16px;
    background: #fefefe;
    border-radius: 16px;
}

.dcm-public-socials a {
    color: #000;
    font-weight: 800;
    text-decoration: none;
    border-bottom: 2px solid var(--dcm-theme, #f90001);
}

.dcm-custom-button {
    width: 100%;
    margin-top: 14px;
}

.dcm-custom-button.secondary {
    background: #000;
}

.dcm-powered {
    margin-top: 26px;
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
}

.dcm-qr {
    width: 160px;
    height: 160px;
    object-fit: contain;
}

@media (max-width: 720px) {
    .dcm-card {
        padding: 24px;
        border-radius: 22px;
    }

    .dcm-grid.two,
    .dcm-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dcm-public-main {
        padding: 24px 12px;
    }

    .dcm-card-public-inner {
        padding: 26px 20px;
        border-radius: 22px;
    }
}

.dcm-radio {
    display: inline-flex;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
}

.dcm-radio input[type="radio"] {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
}

.dcm-alert {
    margin: 0 0 22px;
    padding: 14px 18px;
    border-radius: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.dcm-alert-error {
    background: #fde8e8;
    color: #8a0000;
    border: 1px solid rgba(249, 0, 1, 0.18);
}

.dcm-alert-info {
    background: #fff4d9;
    color: #5f4300;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Phase 2.2 public card refinements */
body.dcm-standalone-card-body,
body.digicard-public-card-page {
    margin: 0;
    background: #fefefe;
}

body.dcm-standalone-card-body .dcm-public-main {
    min-height: 100vh;
    box-sizing: border-box;
}

.dcm-form label.dcm-radio {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100%;
    margin: 12px 0;
}

.dcm-form label.dcm-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin: 0;
}

.dcm-card-public {
    max-width: 620px;
}

.dcm-card-public-inner {
    padding: 38px 42px;
}

.dcm-card-public h1 {
    color: var(--dcm-theme, #f90001) !important;
    font-size: clamp(32px, 5vw, 46px);
    margin: 18px 0 12px;
}

.dcm-public-logo {
    width: 80%;
    max-width: 420px;
    max-height: 150px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 28px;
}

.dcm-public-photo,
.dcm-public-initials {
    width: 168px;
    height: 168px;
    margin: 0 auto 22px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.dcm-public-title {
    font-size: 20px;
    font-weight: 800;
    margin: 8px 0;
}

.dcm-public-company {
    font-size: 22px;
    font-weight: 800;
    margin: 10px 0 22px;
}

.dcm-card-public .dcm-button {
    background: var(--dcm-theme, #f90001);
}

.dcm-add-contact {
    margin: 6px auto 26px;
    min-width: 240px;
}

.dcm-public-contact-list {
    display: grid;
    gap: 12px;
    margin: 10px 0 26px;
    text-align: left;
}

.dcm-contact-item {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
    background: #fff;
    color: #000 !important;
    text-decoration: none !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.dcm-contact-item:hover {
    transform: translateY(-1px);
    border-color: var(--dcm-theme, #f90001);
}

.dcm-contact-icon,
.dcm-public-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dcm-theme, #f90001);
    color: #fff;
}

.dcm-contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.dcm-contact-icon svg,
.dcm-public-socials svg,
.dcm-button svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex: 0 0 auto;
}

.dcm-contact-copy {
    min-width: 0;
}

.dcm-contact-label {
    display: block;
    color: rgba(0, 0, 0, 0.58);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
}

.dcm-contact-value {
    display: block;
    color: #000;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.dcm-public-socials {
    margin-top: 22px;
    margin-bottom: 8px;
}

.dcm-public-socials a {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 0;
    text-decoration: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.dcm-public-socials a:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.dcm-custom-button {
    background: var(--dcm-theme, #f90001) !important;
    max-width: 100%;
}

.dcm-custom-button.secondary {
    background: #000 !important;
}

.dcm-powered a {
    color: rgba(0, 0, 0, 0.62);
    text-decoration: none;
    font-weight: 700;
}

.dcm-powered a:hover {
    color: var(--dcm-theme, #f90001);
}

@media (max-width: 720px) {
    .dcm-card-public {
        max-width: 100%;
    }

    .dcm-card-public-inner {
        padding: 30px 20px;
    }

    .dcm-public-logo {
        width: 86%;
        max-height: 135px;
        margin-bottom: 24px;
    }

    .dcm-public-photo,
    .dcm-public-initials {
        width: 150px;
        height: 150px;
    }

    .dcm-public-company {
        font-size: 21px;
        line-height: 1.25;
    }

    .dcm-contact-item {
        grid-template-columns: 44px 1fr;
        padding: 13px;
        gap: 12px;
    }

    .dcm-contact-icon {
        width: 44px;
        height: 44px;
    }
}

/* Phase 2.6 form and profile image refinements */
.dcm-form input::placeholder,
.dcm-form textarea::placeholder {
    color: rgba(0, 0, 0, 0.42);
}

.dcm-public-photo,
.dcm-public-initials {
    width: 210px;
    height: 210px;
}

.dcm-public-initials {
    font-size: 58px;
}

@media (max-width: 720px) {
    .dcm-public-photo,
    .dcm-public-initials {
        width: 185px;
        height: 185px;
    }

    .dcm-public-initials {
        font-size: 50px;
    }
}

/* Phase 3 dashboard editing and QR refinements */
.dcm-dashboard .dcm-card {
    max-width: 1120px;
}

.dcm-dashboard-form {
    margin-top: 28px;
}

.dcm-dashboard-thumb,
.dcm-dashboard-logo-thumb {
    display: block;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    object-fit: contain;
    padding: 8px;
    margin-bottom: 8px;
}

.dcm-dashboard-thumb {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
}

.dcm-dashboard-logo-thumb {
    width: 180px;
    height: 90px;
}

.dcm-dashboard-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.dcm-dashboard-footer-actions form {
    margin: 0;
}

.dcm-button.secondary {
    background: #000;
}

.dcm-button-danger {
    background: #7a0000 !important;
}

.dcm-dashboard .dcm-qr {
    width: 190px;
    height: 190px;
    padding: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 18px;
}

@media (max-width: 720px) {
    .dcm-dashboard-footer-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .dcm-dashboard-footer-actions .dcm-button,
    .dcm-dashboard-footer-actions form,
    .dcm-dashboard-footer-actions button {
        width: 100%;
    }
}
