/**
 * Public styles for Secure Share Links
 */

/* Main container */
.ssl-access-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Access form */
.ssl-access-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.ssl-header {
    background: linear-gradient(135deg, #0073aa, #005a87);
    color: white;
    padding: 30px;
    text-align: center;
}

.ssl-header h1 {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
}

.ssl-post-info h2 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 500;
}

.ssl-post-meta {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Error header */
.ssl-error-header {
    background: linear-gradient(135deg, #dc3232, #b32d2d);
}

/* Form sections */
.ssl-form-section,
.ssl-info-section,
.ssl-error-section {
    padding: 30px;
}

.ssl-form-section h3,
.ssl-info-section h4,
.ssl-error-section h2 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.ssl-form-section p,
.ssl-info-section p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
}

/* Form elements */
.ssl-form-group {
    margin-bottom: 20px;
}

.ssl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.ssl-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.ssl-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ssl-code-input {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
}

.ssl-input-help {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: #666;
}

/* Buttons */
.ssl-form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ssl-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 140px;
}

.ssl-button-primary {
    background: #0073aa;
    color: white;
}

.ssl-button-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.ssl-button-secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.ssl-button-secondary:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

.ssl-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Info section */
.ssl-info-section {
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.ssl-info-section h4 {
    color: #0073aa;
}

.ssl-info-section ul {
    margin: 0;
    padding-left: 20px;
}

.ssl-info-section li {
    margin-bottom: 8px;
    color: #666;
}

.ssl-back-link {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.ssl-back-link a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

.ssl-back-link a:hover {
    text-decoration: underline;
}

/* Error styles */
.ssl-error-form {
    border-color: #dc3232;
}

.ssl-error-section {
    text-align: center;
    padding: 40px 30px;
}

.ssl-error-icon {
    margin-bottom: 20px;
}

.ssl-error-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.ssl-error-reasons {
    text-align: left;
    max-width: 400px;
    margin: 30px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.ssl-error-reasons h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
}

.ssl-error-reasons ul {
    margin: 0;
    padding-left: 20px;
}

.ssl-error-reasons li {
    margin-bottom: 8px;
    color: #666;
}

/* Loading overlay */
.ssl-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ssl-loading-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
}

.ssl-loading-content p {
    margin: 20px 0 0 0;
    color: #333;
    font-weight: 500;
}

/* Spinner */
.ssl-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    animation: ssl-spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .ssl-access-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .ssl-header {
        padding: 20px;
    }
    
    .ssl-header h1 {
        font-size: 24px;
    }
    
    .ssl-post-info h2 {
        font-size: 18px;
    }
    
    .ssl-form-section,
    .ssl-info-section,
    .ssl-error-section {
        padding: 20px;
    }
    
    .ssl-form-actions {
        flex-direction: column;
    }
    
    .ssl-button {
        width: 100%;
        min-width: auto;
    }
    
    .ssl-code-input {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .ssl-loading-content {
        margin: 0 20px;
        padding: 30px 20px;
    }
}

/* Print styles */
@media print {
    .ssl-loading {
        display: none !important;
    }
}