/* Frontend styles for FCOM Certificates */

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

.fcom-cert-verification-container,
.fcom-my_certificates-container,
.fcom-completions-feed-container {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2D3748;
}

/* Verification Card styles */
.fcom-verification-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.02);
    border: 1px solid #E2E8F0;
    max-width: 600px;
    margin: 30px auto;
    overflow: hidden;
    animation: fcomFadeIn 0.5s ease-out;
}

@keyframes fcomFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.fcom-card-header {
    background: #F8FAFC;
    padding: 24px 30px;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.fcom-card-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1A202C;
}

.fcom-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
}

.badge-active {
    background-color: #DEF7EC;
    color: #03543F;
}

.badge-expired {
    background-color: #FEF08A;
    color: #713F12;
}

.badge-revoked {
    background-color: #FDE8E8;
    color: #9B1C1C;
}

.fcom-card-body {
    padding: 30px;
}

.fcom-field-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #EDF2F7;
}

.fcom-field-row:last-child {
    border-bottom: none;
}

.fcom-field-row strong {
    font-weight: 500;
    color: #718096;
}

.fcom-field-row span,
.fcom-field-row code {
    font-weight: 600;
    color: #2D3748;
}

.fcom-field-row code {
    background: #F7FAFC;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #E2E8F0;
}

.revocation-alert {
    flex-direction: column;
    background: #FFF5F5;
    border: 1px solid #FEB2B2;
    padding: 16px;
    border-radius: 8px;
    margin-top: 15px;
}

.revocation-alert strong {
    color: #C53030;
    margin-bottom: 5px;
}

.revocation-alert p {
    margin: 0;
    color: #9B2C2C;
    font-size: 14px;
}

.fcom-card-footer {
    background: #F8FAFC;
    padding: 20px 30px;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

/* Button styles */
.fcom-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fcom-btn-primary {
    background: #4F5BD5;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(79, 91, 213, 0.15);
}

.fcom-btn-primary:hover {
    background: #3B47BA;
    transform: translateY(-1px);
    color: #ffffff;
}

.fcom-btn-linkedin {
    background: #0077B5;
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 119, 181, 0.15);
}

.fcom-btn-linkedin:hover {
    background: #005E93;
    transform: translateY(-1px);
    color: #ffffff;
}

.fcom-btn-link {
    background: transparent;
    color: #718096;
}

.fcom-btn-link:hover {
    color: #4A5568;
    text-decoration: underline;
}

/* Search Form styles */
.fcom-verification-search-form {
    margin-top: 25px;
}

.fcom-search-input-group {
    display: flex;
    gap: 10px;
}

.fcom-search-input-group input[type="text"] {
    flex-grow: 1;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #CBD5E0;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.fcom-search-input-group input[type="text"]:focus {
    border-color: #4F5BD5;
}

/* Alert styles */
.fcom-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.fcom-alert-error {
    background: #FFF5F5;
    color: #C53030;
    border: 1px solid #FED7D7;
}

.fcom-alert-info {
    background: #EBF8FF;
    color: #2B6CB0;
    border: 1px solid #BEE3F8;
}

/* My Certificates Table styles */
.fcom-my-certificates-container h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.fcom-certs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

.fcom-certs-table th,
.fcom-certs-table td {
    padding: 16px 20px;
    text-align: left;
}

.fcom-certs-table th {
    background-color: #F8FAFC;
    font-weight: 600;
    color: #718096;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #E2E8F0;
}

.fcom-certs-table td {
    border-bottom: 1px solid #EDF2F7;
    font-size: 15px;
}

.fcom-certs-table tr:last-child td {
    border-bottom: none;
}

.fcom-certs-table td code {
    background: #F7FAFC;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #E2E8F0;
}

.fcom-status-pill {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.fcom-status-pill.status-active {
    background: #DEF7EC;
    color: #03543F;
}

.fcom-status-pill.status-expired {
    background: #FEF08A;
    color: #713F12;
}

.fcom-status-pill.status-revoked {
    background: #FDE8E8;
    color: #9B1C1C;
}

.fcom-action-link {
    display: inline-flex;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #F7FAFC;
    border: 1px solid #E2E8F0;
    color: #4F5BD5;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: bold;
}

.fcom-action-link:hover {
    background: #4F5BD5;
    color: #ffffff !important;
    border-color: #4F5BD5;
    transform: scale(1.05);
}

.fcom-action-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fcom-no-certs-container {
    padding: 50px 30px;
    text-align: center;
    background: #F8FAFC;
    border: 2px dashed #E2E8F0;
    border-radius: 12px;
}

.fcom-no-certs-container h3 {
    margin: 0 0 10px 0;
    color: #4A5568;
}

.fcom-no-certs-container p {
    color: #718096;
    margin: 0;
}

/* Recent Completions Feed */
.fcom-completions-feed-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #E2E8F0;
}

.fcom-completions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.fcom-completion-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #EDF2F7;
    font-size: 14px;
    animation: fcomSlideIn 0.3s ease-out;
}

@keyframes fcomSlideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.fcom-completion-item:last-child {
    border-bottom: none;
}

.fcom-completion-item .avatar {
    margin-right: 12px;
    display: flex;
}

.fcom-completion-item .avatar img {
    border-radius: 50%;
}

.fcom-completion-item .text {
    flex-grow: 1;
}

.fcom-completion-item .time {
    font-size: 12px;
    color: #A0AEC0;
}

/* Helpers */
.text-right {
    text-align: right;
}

/* Responsive Table */
@media (max-width: 768px) {
    .fcom-certs-table thead {
        display: none;
    }

    .fcom-certs-table tr {
        display: block;
        border-bottom: 2px solid #E2E8F0;
        padding: 15px 0;
    }

    .fcom-certs-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 15px;
        border-bottom: none;
    }

    .fcom-certs-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #718096;
        font-size: 13px;
        text-transform: uppercase;
    }

    .fcom-certs-table td.text-right {
        text-align: left;
    }
}
