/* Main Container */
.sem-cert-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-family: 'Poppins', sans-serif;
    color: white;
}

/* Header */
.sem-cert-header {
    text-align: center;
    margin-bottom: 30px;
}

.sem-cert-header h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    color: white;
}

.sem-cert-header p {
    font-size: 16px;
    opacity: 0.9;
    color: white;
}

/* Form Container */
.sem-cert-form-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Form Groups */
.sem-form-group {
    margin-bottom: 20px;
}

.sem-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sem-form-group label i {
    margin-right: 8px;
    color: #764ba2;
}

/* Inputs and Selects */
.sem-form-group select,
.sem-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background-color: white;
    color: #333;
}

.sem-form-group select:focus,
.sem-form-group input:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.1);
}

.sem-form-group select {
    cursor: pointer;
    background-color: white;
}

.sem-form-group input {
    background-color: white;
}

.sem-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Email Field Specific Styles */
.sem-email-field {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.sem-email-field label {
    color: white !important;
    font-size: 16px;
    margin-bottom: 12px;
}

.sem-email-field label i {
    color: white !important;
}

.sem-email-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
}

.sem-email-input {
    flex: 1;
    min-width: 0; /* Prevents flex overflow */
    padding: 14px 18px !important;
    font-size: 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    background-color: white !important;
    color: #333 !important;
    border-radius: 10px !important;
}

.sem-email-input:focus {
    border-color: white !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

.sem-email-input::placeholder {
    color: #999;
    opacity: 1;
}

.sem-btn-email {
    background: white !important;
    color: #764ba2 !important;
    border: none !important;
    padding: 0 25px !important;
    font-weight: 600 !important;
    white-space: nowrap;
    min-width: 100px;
}

.sem-btn-email:hover {
    background: #f0f0f0 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.sem-btn-email i {
    color: #764ba2 !important;
}

/* Buttons */
.sem-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.sem-btn i {
    font-size: 18px;
}

.sem-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 100%;
}

.sem-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.sem-btn-secondary {
    background: #95a5a6;
    color: white;
}

.sem-btn-secondary:hover {
    background: #7f8c8d;
}

.sem-btn-success {
    background: #27ae60;
    color: white;
}

.sem-btn-success:hover {
    background: #229954;
}

/* Result Section */
.sem-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    color: #333;
}

.sem-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.sem-result-header h3 {
    margin: 0;
    color: #764ba2;
    font-size: 20px;
}

.sem-result-actions {
    display: flex;
    gap: 10px;
}

/* Certificate Preview */
.sem-certificate-preview {
    position: relative;
    min-height: 400px;
    background: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
}

.sem-pdf-frame {
    width: 100%;
    height: 600px;
    border: none;
    background: white;
}

.sem-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.sem-loading i {
    font-size: 40px;
    color: #764ba2;
    margin-bottom: 10px;
}

/* Messages */
.sem-message {
    margin-top: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.sem-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.sem-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Features Section */
.sem-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.sem-feature {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.sem-feature i {
    font-size: 30px;
    margin-bottom: 10px;
    color: white;
}

.sem-feature h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: white;
}

.sem-feature p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sem-result {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .sem-cert-container {
        margin: 20px;
        padding: 20px;
    }
    
    .sem-cert-header h2 {
        font-size: 28px;
    }
    
    .sem-result-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .sem-result-actions {
        width: 100%;
        justify-content: center;
    }
    
    .sem-features {
        grid-template-columns: 1fr;
    }
    
    .sem-email-input-group {
        flex-direction: column;
    }
    
    .sem-btn-email {
        width: 100%;
        padding: 14px !important;
    }
    
    .sem-pdf-frame {
        height: 400px;
    }
}

/* Loading State */
.sem-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.sem-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Event-specific colors (for future use) */
.sem-event-mansoura {
    border-left: 4px solid #2c3e50;
}

.sem-event-cairo {
    border-left: 4px solid #e74c3c;
}

.sem-event-alexandria {
    border-left: 4px solid #27ae60;
}

.sem-event-asyut {
    border-left: 4px solid #f39c12;
}