/**
 * Gridxels Theme CSS
 * Global styling rules for consistent UI components
 */

/* ============================================
   CONTAINERS & LAYOUT
   ============================================ */

/* Page Container - Full height pages */
.page-container {
    min-height: calc(100vh - 64px);
    padding: 2rem 1.5rem;
}

/* Content Containers - Max width wrappers */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.container-sm {
    max-width: 800px;
    margin: 0 auto;
}

.container-md {
    max-width: 1000px;
    margin: 0 auto;
}

.container-lg {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   PAGE HEADERS
   ============================================ */

/* Page Header - Standard page titles */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.page-subtitle {
    color: rgb(156 163 175); /* text-gray-400 */
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Page Header Variants */
.page-header-left {
    text-align: left;
}

.page-header-left .page-title {
    justify-content: flex-start;
}

.page-header-bordered {
    border-bottom: 4px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1.5rem;
}

/* Page Title Colors */
.page-header-orange .page-title {
    color: #f97316;
}

.page-header-blue .page-title {
    color: #3b82f6;
}

.page-header-green .page-title {
    color: #22c55e;
}

/* ============================================
   ENTITY HEADERS
   ============================================ */

/* Entity Header - For users, clans, etc. */
.entity-header {
    background-color: rgb(17 24 39);
    border-bottom: 4px solid rgba(0, 0, 0, 0.5);
    padding: 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
}

.entity-header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .entity-header-content {
        flex-direction: row;
        align-items: start;
    }
}

/* Entity Avatar/Icon */
.entity-avatar {
    position: relative;
    flex-shrink: 0;
}

.entity-avatar-image {
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    border: 4px solid #000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
}

@media (min-width: 640px) {
    .entity-avatar-image {
        width: 8rem;
        height: 8rem;
        font-size: 3rem;
    }
}

/* Entity avatar variants */
.entity-avatar-user {
    background-color: rgb(59 130 246); /* Azul sólido */
}

.entity-avatar-clan {
    background-color: rgb(249 115 22); /* Naranja sólido */
}

/* Entity Info */
.entity-info {
    flex: 1;
    text-align: center;
}

@media (min-width: 640px) {
    .entity-info {
        text-align: left;
    }
}

.entity-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 640px) {
    .entity-name {
        font-size: 1.875rem;
        justify-content: flex-start;
    }
}

.entity-tag {
    background-color: rgb(234 88 12);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    border: 3px solid #000;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.entity-description {
    color: rgb(209 213 219);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

@media (min-width: 640px) {
    .entity-description {
        font-size: 1rem;
    }
}

.entity-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: rgb(156 163 175);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.entity-meta-highlight {
    color: rgb(251 146 60);
    font-weight: 700;
}

.entity-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .entity-stats {
        justify-content: flex-start;
    }
}

.entity-stat {
    background-color: rgba(31, 41, 55, 0.5);
    border: 3px solid rgb(55 65 81);
    padding: 0.75rem 1rem;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.entity-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.entity-stat-label {
    font-size: 0.875rem;
    color: rgb(156 163 175);
}

.entity-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ============================================
   LEGACY SUPPORT (deprecated)
   ============================================ */
    font-size: 0.875rem;
}

/* ============================================
   GRIDSPOT CARDS - PIXEL ART STYLE
   ============================================ */

/* Pixel Art Card Style */
.gridspot-card {
    background-color: rgb(17 24 39); /* bg-gray-900 */
    overflow: hidden;
    border: 4px solid #374151;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.gridspot-card:hover {
    transform: scale(1.05);
}

/* Card Image Container */
.gridspot-card-image {
    aspect-ratio: 1 / 1;
    background-color: rgb(31 41 55); /* bg-gray-800 */
    position: relative;
    overflow: hidden;
}

.gridspot-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

/* Coordinates Badge Overlay */
.gridspot-coordinates-badge {
    position: absolute;
    bottom: 0.25rem;
    right: 0.25rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: rgb(209 213 219); /* text-gray-300 */
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Card Footer/Info Section */
.gridspot-card-footer {
    padding: 0.5rem;
    background-color: rgb(31 41 55); /* bg-gray-800 */
}

/* Title Styling */
.gridspot-card-title {
    font-size: 0.75rem;
    color: white;
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Description */
.gridspot-card-description {
    color: rgb(107 114 128); /* text-gray-500 */
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Username */
.gridspot-card-username {
    font-size: 0.75rem;
    color: rgb(251 146 60); /* text-orange-400 */
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Date */
.gridspot-card-date {
    color: rgb(75 85 99); /* text-gray-600 */
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* ============================================
   BUTTONS - PIXEL ART STYLE
   ============================================ */

/* Base Button */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: bold;
    transition: all 0.2s;
    cursor: pointer;
    border-width: 4px;
    border-style: solid;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
    outline: none;
}

/* Remove default link/button styles */
.button,
.button:focus,
.button:active {
    outline: none;
    text-decoration: none;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    text-decoration: none;
}

.button:active {
    transform: translateY(0);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

/* Button Colors */
.button-orange {
    background-color: rgb(234 88 12); /* orange-600 */
    border-color: rgb(194 65 12); /* orange-700 */
    color: white;
}

.button-orange:hover {
    background-color: rgb(194 65 12); /* orange-700 */
    border-color: rgb(154 52 18); /* orange-800 */
}

.button-blue {
    background-color: rgb(37 99 235); /* blue-600 */
    border-color: rgb(29 78 216); /* blue-700 */
    color: white;
}

.button-blue:hover {
    background-color: rgb(29 78 216); /* blue-700 */
    border-color: rgb(30 64 175); /* blue-800 */
}

.button-red {
    background-color: rgb(220 38 38); /* red-600 */
    border-color: rgb(185 28 28); /* red-700 */
    color: white;
}

.button-red:hover {
    background-color: rgb(185 28 28); /* red-700 */
    border-color: rgb(153 27 27); /* red-800 */
}

.button-green {
    background-color: rgb(22 163 74); /* green-600 */
    border-color: rgb(21 128 61); /* green-700 */
    color: white;
}

.button-green:hover {
    background-color: rgb(21 128 61); /* green-700 */
    border-color: rgb(22 101 52); /* green-800 */
}

.button-yellow {
    background-color: rgb(202 138 4); /* yellow-600 */
    border-color: rgb(161 98 7); /* yellow-700 */
    color: white;
}

.button-yellow:hover {
    background-color: rgb(161 98 7); /* yellow-700 */
    border-color: rgb(133 77 14); /* yellow-800 */
}

.button-gray {
    background-color: rgb(31 41 55); /* gray-800 */
    border-color: rgb(17 24 39); /* gray-900 */
    color: rgb(209 213 219); /* gray-300 */
}

.button-gray:hover {
    background-color: rgb(55 65 81); /* gray-700 */
    border-color: rgb(31 41 55); /* gray-800 */
    color: white;
}

/* Button Sizes */
.button-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-width: 2px;
}

.button-md {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.button-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

.button-xl {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Button Variants */
.button-block {
    display: flex;
    width: 100%;
}

.button-icon {
    padding: 0.5rem;
    gap: 0;
}

.button-icon-sm {
    padding: 0.25rem;
    border-width: 2px;
}
/* ============================================
   FORMS - Pixel Art Style
   ============================================ */

/* Form Layout */
.form-wrapper {
    background-color: rgb(17 24 39);
    border: 4px solid #000;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.5);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-section {
    background-color: rgba(31, 41, 55, 0.5);
    border: 4px solid rgba(55, 65, 81, 1);
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    color: rgb(209 213 219);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group .required {
    color: #ef4444;
}

/* Form Controls - Pixel Art */
.form-control {
    width: 100%;
    padding: 0.75rem;
    font-family: 'PixeloidMono', monospace;
    font-size: 0.875rem;
    color: white;
    background-color: rgb(31 41 55);
    border: 3px solid rgb(55 65 81);
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.3), 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.form-control::placeholder {
    color: rgb(107 114 128);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-note {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: rgb(156 163 175);
}

/* File Input Override */
input[type="file"].form-control {
    padding: 0.5rem;
    cursor: pointer;
}

/* Form Header (for forms in containers) */
.form-header {
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: rgb(156 163 175);
    font-size: 0.875rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgb(156 163 175);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    transition: color 0.15s ease;
}

.back-link:hover {
    color: white;
}