/* Personalized Cards Creator - Frontend Styles */

.pc-card-creator {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.pc-membership-info {
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    padding: 15px;
    margin-bottom: 20px;
}

.pc-login-notice,
.pc-subscription-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 20px;
    border-radius: 4px;
    text-align: center;
}

.pc-login-btn {
    display: inline-block;
    background: #0073aa;
    color: white !important;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
}

.pc-login-btn:hover {
    background: #005177;
}

.pc-form-group {
    margin-bottom: 20px;
}

.pc-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.pc-form-group input[type="text"],
.pc-form-group input[type="date"],
.pc-form-group select,
.pc-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.pc-form-group input[type="checkbox"] {
    margin-right: 8px;
}

.pc-template-preview {
    margin: 20px 0;
    text-align: center;
    border: 2px dashed #ddd;
    padding: 20px;
    min-height: 200px;
    background: #fafafa;
}

.pc-template-preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.pc-submit-btn {
    background-color: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    font-weight: bold;
    transition: background-color 0.3s;
}

.pc-submit-btn:hover {
    background-color: #005177;
}

.pc-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.pc-loading {
    text-align: center;
    color: #0073aa;
    font-weight: bold;
    padding: 20px;
}

.pc-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    padding: 20px;
    border-radius: 4px;
    margin-top: 20px;
}

.pc-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
    color: #721c24;
}

.pc-card-result {
    margin-top: 20px;
}

.pc-card-result img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
}

.pc-action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.pc-download-btn,
.pc-wallet-btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s;
}

.pc-download-btn {
    background-color: #0073aa;
    color: white !important;
}

.pc-download-btn:hover {
    background-color: #005177;
    color: white !important;
}

.pc-apple-wallet {
    background-color: #000;
    color: white !important;
}

.pc-apple-wallet:hover {
    background-color: #333;
    color: white !important;
}

.pc-google-wallet {
    background-color: #4285f4;
    color: white !important;
}

.pc-google-wallet:hover {
    background-color: #357ae8;
    color: white !important;
}

/* My Cards Grid */
.pc-my-cards {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.pc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.pc-card-item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.pc-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.pc-card-item img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.pc-card-info {
    margin-top: 10px;
}

/* ── Login page ─────────────────────────────────────────── */
.pc-login-wrap {
    max-width: 420px;
    margin: 48px auto;
    padding: 36px 40px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.pc-login-wrap p {
    margin-bottom: 0;
}

.pc-login-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 24px;
    color: #1a1a1a;
    text-align: center;
}

.pc-login-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

/* wp_login_form fields */
.pc-login-wrap #loginform,
.pc-login-wrap .login-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pc-login-wrap .login-username,
.pc-login-wrap .login-password,
.pc-login-wrap .login-remember {
    margin-bottom: 16px;
}

.pc-login-wrap label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.pc-login-wrap input[type="text"],
.pc-login-wrap input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    color: #111;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.pc-login-wrap input[type="text"]:focus,
.pc-login-wrap input[type="password"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,.15);
    background: #fff;
}

.pc-login-wrap .login-remember label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    font-size: 13px;
    color: #555;
    cursor: pointer;
}

.pc-login-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0073aa;
    cursor: pointer;
}

.pc-login-wrap .login-submit,
.pc-login-wrap p.submit {
    margin-top: 8px;
}

.pc-login-wrap input[type="submit"],
.pc-login-wrap .button-primary {
    width: 100%;
    padding: 11px 0;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
    letter-spacing: .02em;
}

.pc-login-wrap input[type="submit"]:hover,
.pc-login-wrap .button-primary:hover {
    background: #005d8c;
}

/* Lost password link */
.pc-login-wrap #nav,
.pc-login-wrap .login-lost-password {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

.pc-login-wrap #nav a,
.pc-login-wrap .login-lost-password a {
    color: #0073aa;
    text-decoration: none;
}

.pc-login-wrap #nav a:hover,
.pc-login-wrap .login-lost-password a:hover {
    text-decoration: underline;
}

/* ── My Card page ───────────────────────────────────────── */
.pc-my-card-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 20px 32px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1d2327;
}

/* Header */
.pc-mc-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.pc-mc-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    display: block;
}
.pc-mc-identity { flex: 1 1 auto; min-width: 0; }
.pc-mc-name { margin: 0; font-size: 20px; line-height: 1.2; }
.pc-mc-memberid { margin: 2px 0 0; font-size: 13px; color: #6b7280; }

.pc-status-badge {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
}
.pc-badge-active  { background: #1a9c5b; }
.pc-badge-soon    { background: #d98a00; }
.pc-badge-expired { background: #c0392b; }

/* Status meter */
.pc-mc-status { margin-bottom: 22px; }
.pc-meter {
    height: 8px;
    background: #e6e8eb;
    border-radius: 999px;
    overflow: hidden;
}
.pc-meter-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: #1a9c5b;
    transition: width .4s ease;
}
.pc-status-soon .pc-meter-fill { background: #d98a00; }
.pc-mc-status-text { margin: 8px 2px 0; font-size: 13px; color: #4b5563; }
.pc-mc-expired-text { color: #c0392b; font-weight: 600; }

/* No card */
.pc-no-card {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
    background: #f7f8fa;
    border: 1px dashed #d3d7dd;
    border-radius: 12px;
}
.pc-no-card p { margin: 0; }

/* Card display */
.pc-card-display {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 6px 22px rgba(0,0,0,0.08);
}

.pc-card-viewer { width: 100%; text-align: center; }
.pc-card-stage {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f3f5;
}
.pc-card-face {
    width: 100%;
    height: auto;
    display: none;
}
.pc-card-face.is-active { display: block; }

/* Flip tabs */
.pc-flip-tabs {
    display: inline-flex;
    margin: 12px auto 0;
    background: #eef0f3;
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
.pc-flip-tab {
    border: none;
    background: transparent;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
}
.pc-flip-tab.is-active { background: #fff; color: #111; box-shadow: 0 1px 3px rgba(0,0,0,.15); }

/* Expired overlay */
.pc-card-expired .pc-card-face { filter: grayscale(60%) brightness(0.85); }
.pc-expired-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.pc-expired-overlay span {
    background: rgba(180, 0, 0, 0.82);
    color: #fff;
    font-size: clamp(1.4rem, 6vw, 3rem);
    font-weight: 900;
    letter-spacing: .2em;
    padding: .25em .6em;
    border: 4px solid rgba(255,255,255,.6);
    border-radius: 6px;
    transform: rotate(-18deg);
    text-shadow: 0 2px 6px rgba(0,0,0,.4);
    user-select: none;
}

.pc-card-date { margin: 14px 2px 0; font-size: 13px; color: #9aa0a6; }

/* Actions */
.pc-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.pc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .12s ease, box-shadow .12s ease, opacity .2s;
}
.pc-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.pc-btn-ico { font-size: 15px; line-height: 1; }
.pc-btn-download      { background: #0073aa; color: #fff !important; }
.pc-btn-apple-wallet  { background: #000;    color: #fff !important; }
.pc-btn-google-wallet { background: #1a73e8; color: #fff !important; }
.pc-btn-disabled {
    background: #e3e6ea !important;
    color: #9aa0a6 !important;
    cursor: not-allowed;
}
.pc-btn-disabled:hover { transform: none; box-shadow: none; }
.pc-btn-download-sm {
    background: #0073aa; color: #fff !important;
    font-size: 12px; padding: 6px 12px; border-radius: 6px;
}

.pc-renew-msg {
    width: 100%;
    margin-top: 12px;
    font-size: 13px;
    color: #c0392b;
}

/* Previous cards */
.pc-previous-cards { margin-top: 32px; }
.pc-previous-cards h3 { font-size: 15px; color: #4b5563; margin: 0 0 12px; }
.pc-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}
.pc-card-item {
    background: #fff;
    border: 1px solid #e3e6ea;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}
.pc-card-item img { width: 100%; height: auto; border-radius: 6px; display: block; margin-bottom: 8px; }
.pc-card-item p { margin: 0 0 8px; font-size: 12px; color: #6b7280; }

.pc-logout-link {
    margin-top: 28px;
    font-size: 13px;
    text-align: right;
}
.pc-logout-link a { color: #6b7280; }

/* ── Responsive */
@media (max-width: 600px) {
    .pc-mc-header { flex-wrap: wrap; }
    .pc-status-badge { order: 3; }
    .pc-card-actions .pc-btn { flex: 1 1 100%; justify-content: center; }
}
