/* Realistic Credential Card Styles */

.credential-card {
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    aspect-ratio: 1.586; /* Standard ID card ratio (85.6 x 53.98 mm) */
    min-height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Portrait Photo for mDL */
.credential-photo {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 80px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.mdl-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.credential-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* DFID Card Styling */
.credential-card.dfid {
    background-image: url('../images/dfid-background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #333;
    position: relative;
}

.credential-card.dfid::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.credential-card.dfid .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.credential-card.dfid .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.credential-card.dfid .card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #2c5530;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    margin: 0;
    flex: 1;
    padding-left: 10%;
}

.credential-card.dfid .credential-type-badge {
    background: rgba(44, 85, 48, 0.9);
    color: white;
    font-size: 0.65rem;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
}

.credential-card.dfid .card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-top: 2px;
    padding-right: 110px;
}

.credential-card.dfid .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    font-size: 0.75rem;
}

.credential-card.dfid .detail-label {
    color: #2c5530;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    font-size: 0.7rem;
    min-width: 120px;
}

.credential-card.dfid .detail-value {
    color: #1a4b1e;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(44, 85, 48, 0.2);
    text-align: center;
    white-space: nowrap;
}

.credential-card.dfid .card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(44, 85, 48, 0.3);
}

.credential-card.dfid .issuer-info {
    font-size: 0.65rem;
    color: #2c5530;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* PID (SA National ID) Card Styling */
.credential-card.pid {
    position: relative;
}

.credential-card.pid .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credential-card.pid .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-left: 75px; /* Move title right to avoid flag overlap */
}

.credential-card.pid .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevent text wrapping */
}

.credential-card.pid .credential-type-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.credential-card.pid .card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 0;
    padding-top: 20px; /* Push data down below the flag */
}

/* PID Portrait Photo */
.credential-card.pid .credential-photo {
    position: absolute;
    top: 60px;
    right: 20px;
    width: 80px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.credential-card.pid .pid-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.credential-card.dfid .dfid-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.credential-card.pid .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px; /* Tighter spacing between rows */
    font-size: 0.75rem;
    max-width: calc(100% - 110px); /* Leave space for portrait */
}

.credential-card.pid .detail-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.3px;
}

.credential-card.pid .detail-value {
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.pid .card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.credential-card.pid .issuer-info {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* National Identity Card Styling */
.credential-card.national-id {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1e40af 100%);
    color: white;
    position: relative;
}

.credential-card.national-id::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

.credential-card.national-id .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credential-card.national-id .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.national-id .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credential-card.national-id .credential-type-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.national-id .card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.credential-card.national-id .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.credential-card.national-id .detail-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.3px;
}

.credential-card.national-id .detail-value {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'Courier New', monospace;
}

.credential-card.national-id .card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.national-id .issuer-info {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Banking Card Styling */
.credential-card.banking {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #047857 100%);
    color: white;
    position: relative;
}

.credential-card.banking::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="diamond" width="20" height="20" patternUnits="userSpaceOnUse"><polygon points="10,0 20,10 10,20 0,10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23diamond)"/></svg>');
    z-index: 1;
}

.credential-card.banking .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credential-card.banking .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.credential-card.banking .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.credential-card.banking .credential-type-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.banking .card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.credential-card.banking .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.credential-card.banking .detail-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.credential-card.banking .detail-value {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.credential-card.banking .card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.banking .issuer-info {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Status indicators */
.status-active {
    color: #10b981 !important;
    font-weight: 600;
}

.status-verified {
    color: #3b82f6 !important;
    font-weight: 600;
}

.status-enhanced {
    color: #8b5cf6 !important;
    font-weight: 600;
}

/* Action buttons styling for cards */
.credential-card .card-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.credential-card .btn-card-action {
    flex: 1;
    padding: 6px 12px;
    font-size: 0.7rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.credential-card.dfid .btn-card-action.primary {
    background: rgba(44, 85, 48, 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.dfid .btn-card-action.primary:hover {
    background: rgba(44, 85, 48, 1);
    transform: translateY(-1px);
}

.credential-card.national-id .btn-card-action.primary,
.credential-card.banking .btn-card-action.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.national-id .btn-card-action.primary:hover,
.credential-card.banking .btn-card-action.primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Bank-Specific Styling */

/* FNB Banking Card - Teal and Orange branding */
.credential-card.fnb {
    background: linear-gradient(135deg, #008C95 0%, #00B7C3 50%, #006E73 100%);
    color: white;
    position: relative;
}

.credential-card.fnb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="fnb-grid" width="15" height="15" patternUnits="userSpaceOnUse"><circle cx="7.5" cy="7.5" r="1" fill="rgba(255,180,0,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23fnb-grid)"/></svg>');
    z-index: 1;
}

.credential-card.fnb .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credential-card.fnb .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.credential-card.fnb .bank-logo {
    width: 60px;
    height: auto;
    filter: brightness(1.2);
}

.credential-card.fnb .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #FFB400;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.credential-card.fnb .credential-type-badge {
    background: rgba(255, 180, 0, 0.9);
    color: #006E73;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ABSA Banking Card - Red branding */
.credential-card.absa {
    background: linear-gradient(135deg, #C41E3A 0%, #E63946 50%, #A01728 100%);
    color: white;
    position: relative;
}

.credential-card.absa::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="absa-pattern" width="25" height="25" patternUnits="userSpaceOnUse"><path d="M0,25 Q12.5,0 25,25 Q12.5,50 0,25" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23absa-pattern)"/></svg>');
    z-index: 1;
}

.credential-card.absa .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credential-card.absa .bank-logo {
    width: 55px;
    height: auto;
    filter: brightness(1.1);
}

.credential-card.absa .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.credential-card.absa .credential-type-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Investec Banking Card - Blue branding */
.credential-card.investec {
    background: linear-gradient(135deg, #003D82 0%, #1E5A96 50%, #002B5C 100%);
    color: white;
    position: relative;
}

.credential-card.investec::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="investec-grid" width="12" height="12" patternUnits="userSpaceOnUse"><path d="M 12 0 L 0 0 0 12" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23investec-grid)"/></svg>');
    z-index: 1;
}

.credential-card.investec .bank-logo {
    width: 65px;
    height: auto;
    filter: brightness(1.1);
}

.credential-card.investec .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #7EC8E3;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.credential-card.investec .credential-type-badge {
    background: rgba(126, 200, 227, 0.2);
    color: #7EC8E3;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(126, 200, 227, 0.3);
}

/* Capitec Banking Card - Blue and Red branding */
.credential-card.capitec {
    background: linear-gradient(135deg, #00A0E3 0%, #E63946 50%, #0077B6 100%);
    color: white;
    position: relative;
}

.credential-card.capitec::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="capitec-waves" width="30" height="15" patternUnits="userSpaceOnUse"><path d="M0,7.5 Q7.5,0 15,7.5 Q22.5,15 30,7.5" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.8"/></pattern></defs><rect width="100" height="100" fill="url(%23capitec-waves)"/></svg>');
    z-index: 1;
}

.credential-card.capitec .bank-logo {
    width: 70px;
    height: auto;
    filter: brightness(1.1);
}

.credential-card.capitec .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.credential-card.capitec .credential-type-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Standard Bank Banking Card - Blue branding */
.credential-card.standard-bank {
    background: linear-gradient(135deg, #0057B7 0%, #1E88E5 50%, #003D82 100%);
    color: white;
    position: relative;
}

.credential-card.standard-bank::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="standard-shields" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M10,2 L16,8 L10,18 L4,8 Z" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23standard-shields)"/></svg>');
    z-index: 1;
}

.credential-card.standard-bank .bank-logo {
    width: 50px;
    height: auto;
    filter: brightness(1.2);
}

.credential-card.standard-bank .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.credential-card.standard-bank .credential-type-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Common styling for all bank cards */
.credential-card.fnb .card-content,
.credential-card.absa .card-content,
.credential-card.investec .card-content,
.credential-card.capitec .card-content,
.credential-card.standard-bank .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credential-card.fnb .card-header,
.credential-card.absa .card-header,
.credential-card.investec .card-header,
.credential-card.capitec .card-header,
.credential-card.standard-bank .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.credential-card.fnb .card-details,
.credential-card.absa .card-details,
.credential-card.investec .card-details,
.credential-card.capitec .card-details,
.credential-card.standard-bank .card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.credential-card.fnb .detail-row,
.credential-card.absa .detail-row,
.credential-card.investec .detail-row,
.credential-card.capitec .detail-row,
.credential-card.standard-bank .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.credential-card.fnb .detail-label,
.credential-card.absa .detail-label,
.credential-card.investec .detail-label,
.credential-card.capitec .detail-label,
.credential-card.standard-bank .detail-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.credential-card.fnb .detail-value,
.credential-card.absa .detail-value,
.credential-card.investec .detail-value,
.credential-card.capitec .detail-value,
.credential-card.standard-bank .detail-value {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.credential-card.fnb .card-footer,
.credential-card.absa .card-footer,
.credential-card.investec .card-footer,
.credential-card.capitec .card-footer,
.credential-card.standard-bank .card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.fnb .issuer-info,
.credential-card.absa .issuer-info,
.credential-card.investec .issuer-info,
.credential-card.capitec .issuer-info,
.credential-card.standard-bank .issuer-info {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Button styling for bank-specific cards */
.credential-card.fnb .btn-card-action.primary,
.credential-card.absa .btn-card-action.primary,
.credential-card.investec .btn-card-action.primary,
.credential-card.capitec .btn-card-action.primary,
.credential-card.standard-bank .btn-card-action.primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.fnb .btn-card-action.primary:hover,
.credential-card.absa .btn-card-action.primary:hover,
.credential-card.investec .btn-card-action.primary:hover,
.credential-card.capitec .btn-card-action.primary:hover,
.credential-card.standard-bank .btn-card-action.primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Special styling for FNB orange accent */
.credential-card.fnb .btn-card-action.primary {
    background: rgba(255, 180, 0, 0.2);
    color: #FFB400;
    border: 1px solid rgba(255, 180, 0, 0.4);
}

.credential-card.fnb .btn-card-action.primary:hover {
    background: rgba(255, 180, 0, 0.3);
    color: white;
}

/* Mobile Driver's License (mDL/mDOC ISO 18013-5) Card Styling */
.credential-card.mdl {
    position: relative;
}

.credential-card.mdl .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 16px;
    padding-bottom: 20px; /* Extra bottom padding to prevent text overflow */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.credential-card.mdl .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.credential-card.mdl .card-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credential-card.mdl .credential-type-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.credential-card.mdl .card-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 0; /* Reset padding to allow detail-row to manage spacing */
}

.credential-card.mdl .detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.75rem;
    max-width: calc(100% - 110px); /* Leave space for portrait (80px + 20px right + 10px gap) */
}

.credential-card.mdl .detail-label {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.3px;
}

.credential-card.mdl .detail-value {
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.credential-card.mdl .card-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.credential-card.mdl .issuer-info {
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Responsive design */
@media (max-width: 768px) {
    .credential-card {
        min-height: 180px;
    }
    
    .credential-card .card-content {
        padding: 12px;
    }
    
    .credential-card .card-title {
        font-size: 0.8rem;
    }
    
    .credential-card .detail-row {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }
    
    .credential-card .detail-value {
        padding: 1px 4px;
        font-size: 0.65rem;
    }
}

@media (max-width: 576px) {
    .credential-card {
        min-height: 160px;
    }
    
    .credential-card .card-content {
        padding: 10px;
    }
    
    .credential-card .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .credential-card .detail-value {
        align-self: flex-end;
    }
}