/* Token Locker Specific Styles */

/* Guide Container - Full width with padding */
.guide-container {
    width: 100%;
    padding: 0 1rem;
    margin-bottom: 1rem;
}

/* Locked Tokens Container - Separate from guide */
.locked-tokens-container {
    width: 100%;
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.locked-tokens-box {
    background: linear-gradient(145deg, #1f2937, #111827);
    padding: 2rem;
    border-radius: 16px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.locked-tokens-box h3 {
    color: #3b82f6;
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
    text-align: center;
}

.user-locks-content {
    font-size: 0.95rem;
    color: #9ca3af;
    text-align: center;
}

/* Main Container - Centers form box */
.main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem 2rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-box {
    background: linear-gradient(145deg, #1f2937, #111827);
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
    transition: transform 0.2s ease;
    height: fit-content;
}

.hero-box:hover {
    transform: scale(1.01);
}

.hero-box label {
    display: block;
    text-align: left;
    margin-top: 1rem;
    font-weight: bold;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

.hero-box input, .hero-box select, .hero-box textarea {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.25rem;
    border-radius: 8px;
    border: none;
    background-color: #0f172a;
    color: white;
    border: 1px solid #334155;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.hero-box input:focus, .hero-box select:focus, .hero-box textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.hero-box input:invalid {
    border-color: #ef4444;
}

.hero-box button {
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #10b981, #3b82f6);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.hero-box button:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.hero-box button:disabled {
    background: #374151;
    cursor: not-allowed;
    color: #9ca3af;
}

/* Two Column Layout for Date/Time */
.two-column-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.two-column-row .column {
    display: flex;
    flex-direction: column;
}

.two-column-row .column label {
    margin-top: 0;
}

/* Token Info Display */
.token-info {
    background: #0f172a;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: 1px solid #10b981;
    display: none;
}

.token-info.show {
    display: block;
}

.token-info h4 {
    margin: 0 0 0.5rem 0;
    color: #10b981;
    font-size: 1rem;
}

.token-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.token-detail span:first-child {
    color: #9ca3af;
}

.token-detail span:last-child {
    color: white;
    font-weight: 500;
}

/* Info Panel - Full Width */
.info-panel {
    background: linear-gradient(145deg, #1f2937, #111827);
    padding: 2rem;
    border-radius: 16px;
    width: 100%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid #334155;
}

.info-panel h2 {
    color: #3b82f6;
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    text-align: center;
}

/* Guide Content Grid */
.guide-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Guide Boxes */
.guide-box {
    background: #0f172a;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #334155;
    transition: transform 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

.guide-box:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.guide-box h3 {
    color: #10b981;
    font-size: 1.1rem;
    margin: 0 0 0.75rem 0;
    text-align: center;
}

.guide-box p {
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

.guide-box a {
    color: #60a5fa;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
    text-align: center;
}

.guide-box a:hover {
    color: #3b82f6;
}

.use-cases {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.use-cases li {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    padding-left: 0;
    position: relative;
    text-align: center;
}

.use-cases li::before {
    content: "";
    display: none;
}

/* Fees Box - At Bottom */
.fees-box {
    background: #0f172a;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #3b82f6;
}

.fees-box h3 {
    color: #3b82f6;
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    text-align: center;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #1e293b;
    border-radius: 8px;
}

.fee-item:last-child {
    margin-bottom: 0;
}

.fee-item span:first-child {
    color: #9ca3af;
    font-weight: 600;
}

.fee-item span:last-child {
    color: #10b981;
    font-weight: bold;
}

.advanced-options {
    margin-top: 1rem;
    padding: 1rem;
    background: #0f172a;
    border-radius: 8px;
    border: 1px solid #374151;
}

.advanced-options h3 {
    margin: 0 0 1rem 0;
    color: #f59e0b;
    font-size: 1rem;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-weight: normal;
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* Fee Display */
.fee-display {
    background: #1e293b;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border: 1px solid #3b82f6;
}

.fee-display h4 {
    margin: 0 0 0.5rem 0;
    color: #3b82f6;
    font-size: 1rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.fee-total {
    border-top: 1px solid #334155;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    font-weight: bold;
}

/* Balance Display */
.balance-display {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.balance-display.insufficient {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Error Messages */
.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #6ee7b7;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: none;
}

.success-message.show {
    display: block;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1024px) {
    .guide-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .guide-container, .locked-tokens-container {
        padding: 0 0.5rem;
    }
    
    .main-container {
        padding: 1rem;
    }
    
    .guide-content {
        grid-template-columns: 1fr;
    }
    
    .two-column-row {
        grid-template-columns: 1fr;
    }
}

/* Force center subtitle - Token Locker page */
div > h1 + p,
h1 + p {
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 800px !important;
}

/* Target the specific wrapper div */
div[style*="flex-direction: column"] > p {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 2rem !important;
}

/* Force remove justify from base template */
.guide-box p,
.guide-box li,
.guide-box * {
    text-align: center !important;
    text-justify: none !important;
}

#locked-tokens-section {
    display: block;
}

.user-locks-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.user-locks-content p {
    text-align: center !important;
    width: 100% !important;
}

.user-locks-content button {
    margin: 0 auto !important;
}

/* *** TARGETED FIX: Advanced Options Checkboxes to Left *** */

/* 1. Ensure the parent container for the options is forced to align left, 
      overriding any inherited 'text-align: center;' from the hero-box or main-container. */
.advanced-options {
    text-align: left !important;
}

/* 2. Target the label (which uses display: flex) to ensure the checkbox and text 
      are aligned to the start (left) and that the label uses the full width. */
.advanced-options .checkbox-group label {
    /* Critical: Ensures the label spans the entire width of the advanced-options box */
    width: 100% !important; 
    
    /* Critical: Aligns the content (checkbox and text) to the left edge of the label */
    justify-content: flex-start !important;
    
    /* Standard text alignment for good measure */
    text-align: left !important; 
    
    /* Ensure the label is still a flex container, though it should be by default */
    display: flex !important;
}

/* 3. Ensure the checkbox itself has no excessive left margin pushing it right */
.advanced-options .checkbox-group input[type="checkbox"] {
    margin-left: 0 !important;
}