/* Utility Classes for Common Inline Styles */

/* ======================== DISPLAY & LAYOUT ======================== */

/* Display Types */
.display-flex {
    display: flex;
}

.display-grid {
    display: grid;
}

.display-block {
    display: block;
}

.display-inline {
    display: inline;
}

.display-inline-block {
    display: inline-block;
}

.display-none {
    display: none;
}

.display-visible {
    display: block;
}

/* Flex Properties */
.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-center-vertical {
    display: flex;
    align-items: center;
}

.flex-center-horizontal {
    display: flex;
    justify-content: center;
}

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

.flex-space-around {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.flex-wrap {
    display: flex;
    flex-wrap: wrap;
}

.flex-gap-8 {
    display: flex;
    gap: 8px;
}

.flex-gap-12 {
    display: flex;
    gap: 12px;
}

.flex-gap-16 {
    display: flex;
    gap: 16px;
}

.flex-gap-20 {
    display: flex;
    gap: 20px;
}

.flex-gap-24 {
    display: flex;
    gap: 24px;
}

/* Grid Properties */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.grid-2-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-3-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.grid-4-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.grid-2fr-1fr {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.grid-2fr-1fr-1fr {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
}

/* ======================== TEXT & ALIGNMENT ======================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

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

.text-sm {
    font-size: 12px;
}

.text-base {
    font-size: 14px;
}

.text-md {
    font-size: 16px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.line-height-1-6 {
    line-height: 1.6;
}

.line-height-1-8 {
    line-height: 1.8;
}

.font-weight-bold {
    font-weight: bold;
}

.font-weight-600 {
    font-weight: 600;
}

.font-weight-500 {
    font-weight: 500;
}

.font-weight-normal {
    font-weight: normal;
}

/* ======================== COLORS ======================== */

/* Primary Colors */
.color-primary {
    color: var(--colorprimary);
}

.color-secondary {
    color: var(--colorsecondary);
}

.color-gray {
    color: var(--colorgray);
}

.color-white {
    color: var(--colorwhite);
}

.color-black {
    color: var(--colorblack);
}

.color-red {
    color: var(--colorRed);
}

.color-green {
    color: var(--colorgreen);
}

.color-blue {
    color: var(--colorblue);
}

/* Background Colors */
.bg-primary {
    background: var(--colorprimary);
}

.bg-secondary {
    background: var(--colorsecondary);
}

.bg-platinum {
    background: var(--colorPlatinum);
}

.bg-white {
    background: var(--colorwhite);
}

.bg-gray {
    background: #f3f4f6;
}

.bg-gray-dark {
    background: #1a1a1a;
}

.bg-blue {
    background: #2196F3;
}

.bg-green {
    background: #4CAF50;
}

.bg-orange {
    background: #FF9800;
}

.bg-purple {
    background: #9C27B0;
}

.bg-red {
    background: #ef4444;
}

.bg-red-light {
    background: #fee2e2;
}

.bg-green-light {
    background: #d1fae5;
}

.bg-yellow-light {
    background: #fef3c7;
}

.bg-blue-light {
    background: #eff6ff;
}

/* Text Color Utilities */
.text-gray {
    color: #9ca3af;
}

.text-gray-light {
    color: #e4e6eb;
}

.text-blue {
    color: #3b82f6;
}

.text-green {
    color: #22c55e;
}

.text-orange {
    color: #f59e0b;
}

.text-red {
    color: #ef4444;
}

.text-red-dark {
    color: #991b1b;
}

/* ======================== SPACING ======================== */

/* Margins */
.m-0 { margin: 0; }
.m-4 { margin: 4px; }
.m-8 { margin: 8px; }
.m-12 { margin: 12px; }
.m-16 { margin: 16px; }
.m-20 { margin: 20px; }
.m-24 { margin: 24px; }

.mx-auto { margin-left: auto; margin-right: auto; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.ml-8 { margin-left: 8px; }
.ml-12 { margin-left: 12px; }
.ml-16 { margin-left: 16px; }
.ml-20 { margin-left: 20px; }

.mr-8 { margin-right: 8px; }
.mr-12 { margin-right: 12px; }
.mr-16 { margin-right: 16px; }
.mr-20 { margin-right: 20px; }

/* Padding */
.p-0 { padding: 0; }
.p-4 { padding: 4px; }
.p-8 { padding: 8px; }
.p-10 { padding: 10px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

.px-20 { padding-left: 20px; padding-right: 20px; }

.pl-20 { padding-left: 20px; }

/* ======================== DIMENSIONS ======================== */

.w-100 {
    width: 100%;
}

.w-auto {
    width: auto;
}

.h-auto {
    height: auto;
}

.h-100vh {
    height: 100vh;
}

.h-100pct {
    height: 100%;
}

/* ======================== BORDERS & SHADOWS ======================== */

.border-left-primary {
    border-left: 4px solid var(--colorprimary);
}

.border-left-blue {
    border-left: 4px solid #3b82f6;
}

.border-left-gray {
    border-left: 1px solid #2d3548;
}

.border-top-gray {
    border-top: 1px solid #e5e7eb;
}

.border-bottom-gray {
    border-bottom: 1px solid #2d3548;
}

.border-right {
    border-right: 1px solid #2d3548;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
}

.shadow-md {
    box-shadow: var(--shadow);
}

.shadow-lg {
    box-shadow: var(--shadowdark);
}

/* ======================== STATUS BADGES & INDICATORS ======================== */

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-active {
    background: #d1fae5;
    color: #065f46;
}

.badge-pending {
    background: #fef3c7;
    color: #78350f;
}

.badge-completed {
    background: #d1fae5;
    color: #065f46;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #78350f;
}

.badge-info {
    background: #eff6ff;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

/* Status Indicator Styles */
.status-active {
    color: #22c55e;
    font-weight: 600;
}

.status-pending {
    color: #f59e0b;
    font-weight: 600;
}

.status-completed {
    color: #22c55e;
    font-weight: 600;
}

.status-failed {
    color: #ef4444;
    font-weight: 600;
}

.status-warning {
    color: #f59e0b;
    font-weight: 600;
}

/* ======================== ALERT BOXES ======================== */

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin: 12px 0;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #22c55e;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #78350f;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* ======================== INFO BOXES ======================== */

.info-box {
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    margin: 12px 0;
    border-radius: 4px;
}

.info-box-dark {
    background: #f3f4f6;
    border-left: 4px solid #3b82f6;
    padding: 16px;
    margin: 12px 0;
    border-radius: 4px;
}

.info-section {
    background: #f3f4f6;
    padding: 12px;
    margin: 8px 0;
    border-radius: 4px;
}

/* ======================== BUTTONS & LINKS ======================== */

.button-block {
    display: block;
    text-align: center;
}

.link-styled {
    text-decoration: none;
    color: #0066cc;
}

.link-styled:hover {
    color: #0052a3;
    text-decoration: underline;
}

.cursor-pointer {
    cursor: pointer;
}

.cursor-default {
    cursor: default;
}

/* ======================== METRIC ICONS ======================== */

.metric-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 24px;
    color: white;
    width: 48px;
    height: 48px;
}

.metric-icon-green {
    background: #4CAF50;
    color: white;
}

.metric-icon-blue {
    background: #2196F3;
    color: white;
}

.metric-icon-orange {
    background: #FF9800;
    color: white;
}

.metric-icon-purple {
    background: #9C27B0;
    color: white;
}

.metric-icon-red {
    background: #ef4444;
    color: white;
}

.metric-icon-success {
    background: #22c55e;
    color: white;
}

.metric-icon-warning {
    background: #f59e0b;
    color: white;
}

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

.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.action-button-primary {
    background: #3b82f6;
    color: white;
}

.action-button-primary:hover {
    background: #2563eb;
}

.action-button-success {
    background: #22c55e;
    color: white;
}

.action-button-success:hover {
    background: #16a34a;
}

.action-button-danger {
    background: #ef4444;
    color: white;
}

.action-button-danger:hover {
    background: #dc2626;
}

/* ======================== LIST STYLES ======================== */

.list-styled {
    padding-left: 20px;
}

.list-styled li {
    margin: 8px 0;
}

/* ======================== OPACITY & TRANSPARENCY ======================== */

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.opacity-100 {
    opacity: 1;
}

/* ======================== OVERFLOW & TEXT WRAPPING ======================== */

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.text-wrap {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.text-nowrap {
    white-space: nowrap;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ======================== POSITIONING ======================== */

.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.position-fixed {
    position: fixed;
}

.position-sticky {
    position: sticky;
}

/* ======================== PAYMENT CARD STYLES ======================== */

.payment-card {
    padding: 16px;
    background: var(--colorPlatinum);
    margin-bottom: 16px;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
}

.payment-method-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    background: white;
    margin-bottom: 8px;
}

.payment-method-option:hover {
    border-color: #ccc;
    background: #f9f9f9;
}

.payment-method-option input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

.payment-method-option input[type="radio"]:checked {
    accent-color: var(--colorgreen);
}

.payment-method-option input[type="radio"]:checked + span {
    color: var(--colorgreen);
}

.payment-method-option.checked {
    border-color: #22c55e;
    background: #e8f5e9;
}

.payment-method-new {
    background: #f9f9f9;
    border-color: #d0d0d0;
}

.payment-method-new:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

/* ======================== FORM ELEMENTS ======================== */

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input-error {
    border-color: #ef4444;
}

.form-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ======================== RESPONSIVE UTILITIES ======================== */

/* ======================== DARK THEME SUPPORT ======================== */

[data-theme="dark"] .payment-card {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .payment-method-option {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .payment-method-option:hover {
    background: #3a3a3a;
    border-color: #555;
}

[data-theme="dark"] .payment-method-option.checked {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.1);
}

[data-theme="dark"] .payment-method-new {
    background: #2a2a2a;
    border-color: #444;
}

[data-theme="dark"] .payment-method-new:hover {
    background: #333;
    border-color: #555;
}

/* ======================== RESPONSIVE UTILITIES ======================== */

@media (max-width: 768px) {
    .grid-auto-fit,
    .grid-2-columns,
    .grid-3-columns,
    .grid-4-columns {
        grid-template-columns: 1fr;
    }

    .grid-2fr-1fr,
    .grid-2fr-1fr-1fr {
        grid-template-columns: 1fr;
    }

    .flex-column-mobile {
        flex-direction: column;
    }

    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
