/* Certificate Viewer Custom Styles */

.ira-logo-parent {
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 2rem 2rem 1.25rem 1.25rem;
  background-color: #fbfdff;
}

.myPhotos {
  position: relative;
  display: inline-block;
  overflow: hidden;
  width: 177px;
  height: 177px;
  padding: 10px;
}

.myPhotos .profile-pic {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.122);
  border-radius: 50%;
}

.myPhotos .verified-badge {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 48px;
  height: 48px;
}

.ira-logo-icon {
    /* Place the logo centered inside the card and scale with card size */
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40%;           /* relative to card width - scales responsively */
    height: auto;
    opacity: 0.1;        /* subtle watermark */
    pointer-events: none;
    z-index: 0;           /* behind card content */
}

/* Ensure visible card content is above the watermark */
.ira-logo-parent .card-body,
.ira-logo-parent .myPhotos,
.ira-logo-parent h2,
.ira-logo-parent .container,
.ira-logo-parent .textStyle {
    position: relative;
    z-index: 1;
}

.textStyle {
    font-size: 0.95rem;
    line-height: 1.4;
}

.fw-semibold {
    color: #333;
    font-weight: 600;
}

/* Status Colors */
.status-verified {
    color: #28a745 !important;
    font-weight: 600;
}

.status-expired {
    color: #dc3545 !important;
    font-weight: 600;
}

.status-rejected {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Certificate Details Layout */
.certificate-row {
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.certificate-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.certificate-label {
    font-weight: 600;
    color: #495057;
    text-align: right;
}

.certificate-value {
    color: #212529;
    word-break: break-word;
}

/* Responsive Design */
@media (max-width: 576px) {
    .card.ira-logo-parent {
        margin: 1rem;
        padding: 1.5rem !important;
    }
    /* On small screens scale the watermark to nearly fill the card but keep low opacity */
    .ira-logo-icon {
        width: 50%;
        opacity: 0.1;
    }
    
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    
    .verified-badge {
        width: 28px;
        height: 28px;
    }
    
    .certificate-label {
        text-align: left !important;
        font-size: 0.9rem;
    }
    
    .certificate-value {
        font-size: 0.9rem;
        margin-top: 0.25rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .no-print {
        display: none !important;
    }
    
    .card.ira-logo-parent {
        box-shadow: none;
        border: 2px solid #000;
    }
    
    body {
        background: white !important;
    }
}

/* Animation Effects */
.certificate-card-enter {
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Badges */
.badge-verified {
    background-color: #28a745;
    color: white;
}

.badge-expired {
    background-color: #dc3545;
    color: white;
}

.badge-pending {
    background-color: #ffc107;
    color: #212529;
}

/* Enhanced Card Hover Effects */
.certificate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0,102,204,0.2);
    transition: all 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}