/**
 * LGU #4 - Buttons Component Styles
 * Dedicated styles for the buttons page
 * 
 * This file contains:
 * - Button-specific styling
 * - Page layout and organization
 * - Component showcase styling
 * - Usage documentation styling
 * 
 * @version 1.0.0
 * @author LGU #4 Development Team
 */

/* ===================================
   GLOBAL RESPONSIVE SETTINGS
   =================================== */
* {
    box-sizing: border-box;
}

/* ===================================
   BUTTON VARIANTS - Color-specific button styles
   =================================== */
.btn-success {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-1px);
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

.btn-warning:hover {
    background-color: #e0a800;
    border-color: #e0a800;
    transform: translateY(-1px);
}

.btn-info {
    background-color: #17a2b8;
    color: white;
    border-color: #17a2b8;
}

.btn-info:hover {
    background-color: #138496;
    border-color: #138496;
    transform: translateY(-1px);
}

/* ===================================
   BUTTON SIZES - Different button dimensions
   =================================== */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 16px;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 12px;
}

/* ===================================
   OUTLINE BUTTONS - Transparent button variants
   =================================== */
.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color-1);
    border-color: var(--primary-color-1);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color-1);
    color: white;
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--text-color-1);
    border-color: var(--border-color-1);
}

.btn-outline-secondary:hover {
    background-color: var(--text-color-1);
    color: white;
}

.btn-outline-success {
    background-color: transparent;
    color: #28a745;
    border-color: #28a745;
}

.btn-outline-success:hover {
    background-color: #28a745;
    color: white;
}

.btn-outline-danger {
    background-color: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    color: white;
}

.btn-outline-warning {
    background-color: transparent;
    color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    color: #212529;
}

.btn-outline-info {
    background-color: transparent;
    color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-info:hover {
    background-color: #17a2b8;
    color: white;
}

/* ===================================
   BUTTON STATES - Disabled, loading, and active states
   =================================== */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
}

.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===================================
   BUTTON SHOWCASE - Layout for button demonstrations
   =================================== */
.buttons-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
    align-items: center;
}

/* ===================================
   PAGE CONTENT STYLING - Page-specific layout
   =================================== */
.page-content {
    max-width: 100%;
}

/* ===================================
   COMPONENT SECTIONS - Individual component demonstrations
   =================================== */
.component-section {
    margin-bottom: 3rem;
    background: var(--card-bg-1);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color-1);
    box-shadow: 0 4px 12px var(--shadow-1);
    width: 100%;
    overflow: hidden;
}

.component-section h3 {
    color: var(--text-color-1);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    word-break: break-word;
}

.component-section h3 i {
    color: var(--primary-color-1);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.component-section h4 {
    color: var(--text-color-1);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    word-break: break-word;
}

.component-section p {
    color: var(--text-secondary-1);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    word-break: break-word;
}

/* ===================================
   USAGE REQUIREMENTS - File dependencies display
   =================================== */
.usage-requirements {
    background: var(--header-bg-1);
    border: 1px solid var(--border-color-1);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    width: 100%;
    overflow: hidden;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: var(--card-bg-1);
    border-radius: 6px;
    border: 1px solid var(--border-color-1);
    flex-wrap: wrap;
}

.requirement-item:last-child {
    margin-bottom: 0;
}

.requirement-item i {
    color: var(--primary-color-1);
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.requirement-item span {
    word-break: break-word;
    flex: 1;
    min-width: 200px;
}

/* ===================================
   IMPLEMENTATION STEPS - Step-by-step guide styling
   =================================== */
.implementation-steps {
    margin: 1.5rem 0;
    width: 100%;
}

.step-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-bg-1);
    border-radius: 8px;
    border: 1px solid var(--border-color-1);
    transition: all 0.3s ease;
    flex-wrap: wrap;
    width: 100%;
}

.step-item:hover {
    border-color: var(--primary-color-1);
    box-shadow: 0 4px 12px var(--shadow-1);
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.step-content {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.step-content strong {
    color: var(--text-color-1);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.step-content pre {
    margin: 0.5rem 0 0 0;
    background: var(--header-bg-1);
    border: 1px solid var(--border-color-1);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
    max-width: 100%;
}

.step-content code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-color-1);
    line-height: 1.4;
    word-break: break-all;
}

/* ===================================
   CODE BLOCKS - Syntax highlighting and styling
   =================================== */
pre {
    background: var(--header-bg-1);
    border: 1px solid var(--border-color-1);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    max-width: 100%;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-color-1);
    word-break: break-all;
}

pre code {
    display: block;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ===================================
   ICON LINK FIXES - Prevent icon text overlapping
   =================================== */
a i {
    margin-right: 0.5rem;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

/* ===================================
   RESPONSIVE DESIGN - Mobile and tablet adjustments
   =================================== */
@media (max-width: 1200px) {
    .component-section {
        padding: 1.75rem;
    }
    
    .buttons-showcase {
        gap: 0.75rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 15px;
    }
}

@media (max-width: 1024px) {
    .component-section h3 {
        font-size: 1.5rem;
    }
    
    .component-section h4 {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .component-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .component-section h3 {
        font-size: 1.375rem;
        gap: 0.5rem;
    }
    
    .component-section h3 i {
        font-size: 1.25rem;
    }
    
    .usage-requirements {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .requirement-item {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        padding: 0.625rem;
    }
    
    .requirement-item i {
        align-self: center;
        margin-bottom: 0;
    }
    
    .requirement-item span {
        min-width: auto;
        flex: 1;
    }
    
    .step-item {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .step-number {
        align-self: flex-start;
    }
    
    .step-content pre {
        font-size: 12px;
        padding: 0.75rem;
    }
    
    .buttons-showcase {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .buttons-showcase .btn {
        width: auto;
        min-width: 120px;
        justify-content: center;
    }
    
    pre {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    pre code {
        font-size: 13px;
    }
}

@media (max-width: 600px) {
    .buttons-showcase {
        flex-direction: column;
        align-items: stretch;
    }
    
    .buttons-showcase .btn {
        width: 100%;
        justify-content: center;
    }
    
    .requirement-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .requirement-item i {
        align-self: flex-start;
    }
    
    .icon-link {
        white-space: normal;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .component-section {
        padding: 1.25rem;
        border-radius: 8px;
    }
    
    .component-section h3 {
        font-size: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .component-section h4 {
        font-size: 1.125rem;
        margin: 1.5rem 0 0.75rem 0;
    }
    
    .component-section p {
        font-size: 0.9375rem;
        line-height: 1.5;
    }
    
    .step-content strong {
        font-size: 1rem;
    }
    
    .step-content code {
        font-size: 11px;
    }
    
    .step-content pre {
        padding: 0.625rem;
        margin-top: 0.5rem;
    }
    
    pre code {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 0.1875rem 0.5rem;
        font-size: 11px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.875rem;
    }
}

@media (max-width: 375px) {
    .component-section {
        padding: 1rem;
    }

    .component-section h3 {
        font-size: 1.125rem;
    }
    
    .component-section h4 {
        font-size: 1rem;
    }
    
    .buttons-showcase {
        gap: 0.375rem;
        margin: 1.5rem 0;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .step-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .usage-requirements {
        padding: 0.75rem;
    }
    
    pre {
        padding: 0.75rem;
    }
    
    pre code {
        font-size: 10px;
    }
}

@media (max-width: 320px) {
    .component-section h3 {
        font-size: 1rem;
    }
    
    .component-section p {
        font-size: 0.875rem;
    }
    
    .buttons-showcase .btn {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
    
    .step-content strong {
        font-size: 0.9375rem;
    }
    
    .step-content code {
        font-size: 10px;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .buttons-showcase {
        page-break-inside: avoid;
    }
    
    .component-section {
        border: 1px solid #ddd;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    pre {
        page-break-inside: avoid;
    }
}