/* =========================================
   Frontend Styles - Student Certificates
   ========================================= */

.sc-search-wrapper {
    display: block;
    width: 100%;
    max-width: 1180px; /* Fixed width for laptop */
    margin: 40px auto; /* Centers the wrapper immediately */
    padding: 0 15px;   /* Prevents touching edges on smaller screens */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

/* =========================================
   1. Search Form Container (Black Box)
   ========================================= */
.sc-search-form-container {
    background: #000000;
    padding: 40px 30px; /* REDUCED HEIGHT: Less padding top/bottom */
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    color: #fff;
    /* Ensure it doesn't shift left on load */
    margin-left: auto; 
    margin-right: auto;
}

.sc-search-title {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 26px; /* Slightly smaller for better proportion */
    font-weight: 700;
}

.sc-search-description {
    color: #cccccc;
    font-size: 14px;
    margin: 0 0 30px 0; /* Reduced margin to tighten layout */
}

.sc-search-form {
    width: 100%;
    max-width: 1180px; /* Limits form width inside the black box */
    margin: 0 auto;   /* Centers the form inputs */
}

.sc-form-row {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

.sc-form-group {
    flex: 1;
    text-align: left;
}

.sc-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: #a0aec0;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.sc-search-input {
    width: 100%;
    height: 50px; /* Slightly reduced height for better look */
    padding: 0 15px;
    border: 3px solid #FFD700; /* Yellow Border */
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    background: #fff;
    color: #333;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
}

.sc-search-input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.3);
}

.sc-search-btn {
    flex: 0 0 auto;
    height: 50px; /* Matches input height */
    padding: 0 30px;
    background: #00A651; /* DEFAULT: GREEN */
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* HOVER STATE: YELLOW (As requested) */
.sc-search-btn:hover {
    background: #FFD700; /* HOVER: YELLOW */
    color: #000;         /* Black text for contrast on yellow */
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* =========================================
   2. Search Result Card
   ========================================= */
.sc-search-result {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.sc-result-banner {
    background-color: #e6fffa;
    padding: 12px 20px;
    text-align: center;
    border-bottom: 1px solid #b2f5ea;
}

.sc-result-banner h3 {
    margin: 0;
    color: #00A651;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sc-certificate-info-card {
    padding: 35px 40px;
}

.sc-info-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
    border-bottom: 1px solid #f7f7f7;
    padding-bottom: 20px;
}

.sc-info-row:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sc-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sc-info-label {
    font-size: 11px;
    font-weight: 700;
    color: #718096;
    text-transform: uppercase;
}

.sc-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.sc-status-text {
    color: #00A651;
    font-weight: 700;
}

.sc-certificate-actions {
    padding: 0 40px 35px 40px;
    text-align: center;
}

.sc-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 0;
    background: #0f172a;
    color: #fff !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.sc-download-btn:hover {
    background: #1e293b;
}

/* =========================================
   3. Error Card
   ========================================= */
.sc-error-card {
    background: #fff;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 20px 25px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.sc-error-icon-box {
    font-size: 22px;
    padding-top: 2px;
}

.sc-error-title {
    margin: 0 0 4px 0;
    color: #dc2626;
    font-size: 17px;
    font-weight: 700;
}

.sc-error-text {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

.sc-contact-actions {
    display: flex;
    gap: 10px;
}

.sc-contact-btn {
    padding: 6px 12px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    text-decoration: none;
    color: #4a5568;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sc-contact-btn:hover {
    background: #edf2f7;
}

/* =========================================
   4. Mobile Responsiveness
   ========================================= */
@media (max-width: 768px) {
    .sc-search-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }

    .sc-search-form-container {
        padding: 30px 20px;
    }
    
    .sc-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .sc-search-btn {
        width: 100%;
        margin-top:5px;
        justify-content: center;
    }
    
    .sc-info-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sc-certificate-info-card {
        padding: 25px 20px;
    }
    
    .sc-certificate-actions {
        padding: 0 20px 25px 20px;
    }
}