/**
 * SecureShare - Complete Standalone Styles
 *
 * A minimal, modern CSS framework for SecureShare.
 * No dependencies - completely self-contained.
 *
 * @package SecureShare
 * @author  FatLab
 * @license MIT
 */

/* ============================================================================
   CSS RESET & BASE STYLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
    min-height: 100vh;
}

/* ============================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: #2c3e50;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

code, pre {
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9em;
}

/* ============================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============================================================================
   HEADER
   ========================================================================== */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e1e4e8;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-logo:hover {
    color: #007bff;
    text-decoration: none;
}

.site-logo-icon {
    font-size: 1.75rem;
}

/* ============================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.site-footer p {
    margin-bottom: 0.5rem;
}

.site-footer a {
    color: #3498db;
}

.site-footer a:hover {
    color: #5dade2;
}

/* ============================================================================
   MAIN CONTENT
   ========================================================================== */

.main-content {
    padding: 2rem 0 3rem;
    min-height: calc(100vh - 300px);
}

.page-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    text-align: center;
    color: #6c757d;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* ============================================================================
   CARDS
   ========================================================================== */

.card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.card-gray {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.875rem;
}

/* ============================================================================
   FORMS
   ========================================================================== */

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

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #495057;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control:disabled {
    background-color: #e9ecef;
    opacity: 1;
}

textarea.form-control {
    resize: vertical;
    font-family: 'Courier New', Consolas, Monaco, monospace;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.form-text-right {
    text-align: right;
}

/* Input group (for copy button next to input) */
.input-group {
    display: flex;
    width: 100%;
    margin-bottom: 1rem;
}

.input-group .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* ============================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover:not(:disabled) {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover:not(:disabled) {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover:not(:disabled) {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-outline-secondary {
    color: #6c757d;
    background-color: transparent;
    border-color: #6c757d;
}

.btn-outline-secondary:hover:not(:disabled) {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================================================
   ALERTS
   ========================================================================== */

.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* ============================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

/* Text alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

/* Text colors */
.text-muted { color: #6c757d !important; }
.text-primary { color: #007bff !important; }
.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }

/* Margins */
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

/* ============================================================================
   SECURESHARE SPECIFIC STYLES
   ========================================================================== */

/* Security Info Box */
.security-info {
    background: #e8f4f8;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.security-info h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.security-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-info li {
    padding: 0.375rem 0;
    color: #555;
}

.security-info li::before {
    content: "•";
    color: #007bff;
    font-weight: bold;
    display: inline-block;
    width: 1.25rem;
}

/* Security Notice (Warning style) */
.security-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.security-notice h5 {
    color: #856404;
    margin-bottom: 1rem;
    font-weight: 600;
}

.security-notice ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.security-notice li {
    padding: 0.375rem 0;
    color: #856404;
}

.security-notice li::before {
    content: "•";
    color: #856404;
    font-weight: bold;
    display: inline-block;
    width: 1.25rem;
}

/* Secret Display */
.secret-display {
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9375rem;
    line-height: 1.6;
    min-height: 12.5rem;
    word-break: break-word;
    white-space: pre-wrap;
    color: #2c3e50;
}

/* Actions (button group) */
.actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.actions .btn {
    flex: 1;
}

/* Secret URL input styling */
#secret-url {
    background: #fff;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.875rem;
}

/* Icon helpers (using Unicode emojis) */
.icon-lock::before { content: "🔒 "; }
.icon-clock::before { content: "⏰ "; }
.icon-shield::before { content: "🛡️ "; }
.icon-eye::before { content: "👁️ "; }

/* Loading spinner for buttons */
.btn .spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    /* Typography adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    /* Layout adjustments */
    .card {
        padding: 1.25rem;
        border-radius: 8px;
    }

    .card-gray {
        padding: 1.25rem;
    }

    /* Form adjustments */
    .form-control {
        padding: 0.625rem 0.875rem;
    }

    /* Button adjustments */
    .btn {
        padding: 0.625rem 1.25rem;
    }

    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    /* Actions become stacked on mobile */
    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
    }

    /* Input groups stack on mobile */
    .input-group {
        flex-direction: column;
    }

    .input-group .form-control {
        border-radius: 0.375rem;
        margin-bottom: 0.5rem;
    }

    .input-group .btn {
        border-radius: 0.375rem;
        width: 100%;
    }
}

@media (max-width: 576px) {
    /* Even smaller screens */
    .container,
    .container-sm {
        padding: 0 10px;
    }

    .main-content {
        padding: 1rem 0 2rem;
    }

    .card {
        padding: 1rem;
    }
}

/* ============================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .btn,
    .actions {
        display: none;
    }

    body {
        background: #fff;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
