/**
 * Public Gated Access Form Styles
 */

.ikim-access-form-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Error states for form validation */
.form-group input.error,
.form-group select.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-group input.error:focus,
.form-group select.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.ikim-access-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ikim-access-form h3 {
    color: #002896;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.ikim-access-form p {
    margin-bottom: 1.5rem;
    color: #6c757d;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #40464c;
}

.form-group .required {
    color: #dc3545;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #002896;
    box-shadow: 0 0 0 0.2rem rgba(0, 40, 150, 0.25);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

.ikim-submit-btn {
    background: #002896;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    width: 100%;
}

.ikim-submit-btn:hover {
    background: #001f7a;
}

.ikim-submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 4px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.form-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.form-message.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Form steps */
.form-step {
    transition: opacity 0.3s ease-in-out;
}

.form-step.fade-out {
    opacity: 0;
}

.form-step.fade-in {
    opacity: 1;
}

/* Loading state */
.loading {
    position: relative;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #002896;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Public Gated Hub Styles */
.ikim-public-gated-hub {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.hub-header {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.hub-header h2 {
    color: #002896;
    margin-bottom: 1rem;
}

.access-info {
    margin-top: 1rem;
    padding: 0.5rem;
    background: #e9ecef;
    border-radius: 4px;
    display: inline-block;
}

.content-groups {
    display: grid;
    gap: 2rem;
}

.content-group {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.content-group h3 {
    color: #40464c;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #002896;
}

.content-items {
    display: grid;
    gap: 1rem;
}

.content-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    transition: box-shadow 0.15s ease-in-out;
}

.content-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.content-item h4 {
    margin-bottom: 0.5rem;
}

.content-item h4 a {
    color: #002896;
    text-decoration: none;
}

.content-item h4 a:hover {
    text-decoration: underline;
}

.content-item p {
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.item-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.no-content {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.hub-footer {
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
}

/* Access denied/expired styles */
.ikim-access-denied,
.ikim-access-expired {
    text-align: center;
    padding: 3rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.ikim-access-denied h2,
.ikim-access-expired h2 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.ikim-back-btn {
    display: inline-block;
    background: #002896;
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.15s ease-in-out;
}

.ikim-back-btn:hover {
    background: #001f7a;
    color: white;
    text-decoration: none;
}

.expired-actions {
    margin-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .ikim-access-form-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .ikim-access-form {
        padding: 1.5rem;
    }
    
    .ikim-public-gated-hub {
        padding: 1rem 0.5rem;
    }
    
    .hub-header {
        padding: 1.5rem;
    }
    
    .content-group {
        padding: 1rem;
    }
    
    .content-items {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) {
    .content-items {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}