/* Public Interface Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    padding-bottom: 5rem; /* Space for footer */
    position: relative;
}

.public-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
}

.public-container > .certificate-form-container {
    width: 100%;
    max-width: 600px;
}

.certificate-form-container {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.certificate-form-container h1 {
    color: #c00;
    margin-bottom: 0.5rem;
    text-align: center;
    font-size: 2rem;
}

.certificate-form-container > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #c00;
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background-color: #c00;
    color: white;
}

.btn-primary:hover {
    background-color: #a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 0, 0, 0.4);
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.success-message,
.error-message {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Error Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    margin: 10% auto;
    z-index: 1001;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
    margin: 0;
    color: #c00;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    margin: 0;
    color: #333;
    line-height: 1.6;
    font-size: 1rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
}

/* Responsive */
@media (max-width: 768px) {
    .certificate-form-container {
        padding: 2rem 1.5rem;
    }
    
    .certificate-form-container h1 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
}

/* Footer */
.public-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    z-index: 100;
    width: 100%;
}

.public-footer p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

