libra/resources/css/app.css

437 lines
12 KiB
CSS

/* Google Fonts - Cairo (Arabic) and Montserrat (English) */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Montserrat:wght@300;400;600;700&display=swap');
@import 'tailwindcss';
@import '../../vendor/livewire/flux/dist/flux.css';
@source '../views';
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../vendor/livewire/flux-pro/stubs/**/*.blade.php';
@source '../../vendor/livewire/flux/stubs/**/*.blade.php';
@custom-variant dark (&:where(.dark, .dark *));
@theme {
/* Font definitions - to be updated in typography story */
--font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--font-arabic: 'Cairo', 'Tajawal', ui-sans-serif, system-ui, sans-serif;
--font-english: 'Montserrat', 'Lato', ui-sans-serif, system-ui, sans-serif;
/* Font Size Scale */
--font-size-xs: 0.75rem; /* 12px */
--font-size-sm: 0.875rem; /* 14px - Small text */
--font-size-base: 1rem; /* 16px - Body text */
--font-size-lg: 1.125rem; /* 18px */
--font-size-xl: 1.25rem; /* 20px */
--font-size-2xl: 1.5rem; /* 24px - H3 */
--font-size-3xl: 2rem; /* 32px - H2 */
--font-size-4xl: 2.5rem; /* 40px - H1 */
/* Primary Brand Colors */
--color-navy: #0A1F44;
--color-gold: #D4AF37;
/* Supporting Colors */
--color-gold-light: #F4E4B8;
--color-cream: #F9F7F4;
--color-charcoal: #2C3E50;
/* Status Colors */
--color-success: #27AE60;
--color-danger: #E74C3C;
--color-warning: #F39C12;
/* Semantic Aliases - used by components */
--color-primary: var(--color-navy);
--color-accent: var(--color-gold);
--color-accent-content: var(--color-gold);
--color-accent-foreground: var(--color-navy);
--color-background: var(--color-cream);
--color-text: var(--color-charcoal);
}
@layer theme {
.dark {
--color-accent: var(--color-white);
--color-accent-content: var(--color-white);
--color-accent-foreground: var(--color-neutral-800);
}
}
@layer base {
*,
::after,
::before,
::backdrop,
::file-selector-button {
border-color: var(--color-gray-200, currentColor);
}
}
/* ==========================================================================
Flux UI Form Component Styling (Story 9.5)
========================================================================== */
/* Field wrapper - grid layout with gap */
[data-flux-field]:not(ui-radio, ui-checkbox) {
@apply grid gap-2;
}
/* Label styling - semibold weight per specs */
[data-flux-label] {
@apply !mb-0 !leading-tight font-semibold text-charcoal;
}
/* Input, Textarea, Select base styling */
input[data-flux-control],
textarea[data-flux-control],
[data-flux-control] input,
select[data-flux-control],
[data-flux-select-button] {
@apply border-charcoal/30 rounded-md transition-colors;
}
/* Focus states - Gold border with subtle ring */
input:focus[data-flux-control],
textarea:focus[data-flux-control],
select:focus[data-flux-control],
[data-flux-control] input:focus,
[data-flux-select-button]:focus {
@apply outline-hidden border-gold ring-2 ring-gold/20;
}
/* Textarea minimum height */
textarea[data-flux-control] {
@apply min-h-[120px] resize-y;
}
/* Checkbox styling - gold accent when checked */
[data-flux-checkbox] input[type="checkbox"],
input[type="checkbox"][data-flux-control] {
@apply w-5 h-5 rounded border-charcoal/30 text-gold focus:ring-gold focus:ring-offset-0;
}
/* Radio styling - gold accent when selected */
[data-flux-radio] input[type="radio"],
input[type="radio"][data-flux-control] {
@apply w-5 h-5 border-charcoal/30 text-gold focus:ring-gold focus:ring-offset-0;
}
/* Error state styling for Flux fields */
[data-flux-field]:has([data-flux-error]) input[data-flux-control],
[data-flux-field]:has([data-flux-error]) textarea[data-flux-control],
[data-flux-field]:has([data-flux-error]) select[data-flux-control],
[data-flux-field]:has([data-flux-error]) [data-flux-select-button] {
@apply border-danger;
}
[data-flux-field]:has([data-flux-error]) input:focus[data-flux-control],
[data-flux-field]:has([data-flux-error]) textarea:focus[data-flux-control],
[data-flux-field]:has([data-flux-error]) select:focus[data-flux-control],
[data-flux-field]:has([data-flux-error]) [data-flux-select-button]:focus {
@apply border-danger ring-danger/20;
}
/* Error message styling */
[data-flux-error] {
@apply text-sm text-danger mt-1;
}
/* RTL support for Flux components */
[dir="rtl"] [data-flux-label] {
@apply text-right;
}
[dir="rtl"] [data-flux-error] {
@apply text-right;
}
[dir="rtl"] input[data-flux-control],
[dir="rtl"] textarea[data-flux-control],
[dir="rtl"] select[data-flux-control] {
@apply text-right;
}
/* \[:where(&)\]:size-4 {
@apply size-4;
} */
/* Prose Navy styling for blog posts */
.prose-navy {
--tw-prose-headings: var(--color-navy);
--tw-prose-links: var(--color-gold);
--tw-prose-bold: var(--color-navy);
--tw-prose-body: var(--color-charcoal);
}
.prose-navy a {
text-decoration: underline;
}
.prose-navy a:hover {
color: var(--color-gold-light);
}
/* Dynamic Font Selection based on language */
html[lang="ar"] body {
font-family: var(--font-arabic);
}
html[lang="en"] body {
font-family: var(--font-english);
}
/* Typography Base Styles */
body {
font-size: var(--font-size-base);
line-height: 1.6;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1.3;
}
h1 {
font-size: var(--font-size-4xl);
font-weight: 700;
}
h2 {
font-size: var(--font-size-3xl);
font-weight: 600;
}
h3 {
font-size: var(--font-size-2xl);
font-weight: 600;
}
small, .text-sm {
font-size: var(--font-size-sm);
}
/* ==========================================================================
Button Styling System (Story 9.4)
========================================================================== */
/* Primary button - Gold background with Navy text */
.btn-primary {
@apply bg-gold text-navy rounded-md px-6 py-3 font-semibold transition-colors;
@apply hover:bg-gold-light;
@apply focus:outline-none focus:ring-2 focus:ring-gold focus:ring-offset-2;
}
/* Secondary button - Outlined with Gold border */
.btn-secondary {
@apply bg-transparent border-2 border-gold text-gold rounded-md px-6 py-3 font-semibold transition-colors;
@apply hover:bg-gold hover:text-navy;
@apply focus:outline-none focus:ring-2 focus:ring-gold focus:ring-offset-2;
}
/* Danger button - Red background */
.btn-danger {
@apply bg-danger text-white rounded-md px-6 py-3 font-semibold transition-colors;
@apply hover:bg-danger/90;
@apply focus:outline-none focus:ring-2 focus:ring-danger focus:ring-offset-2;
}
/* Disabled state - applies to all button variants */
.btn-disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
button.btn-primary:disabled,
button.btn-secondary:disabled,
button.btn-danger:disabled {
@apply !bg-[#CCCCCC] !text-[#666666] !cursor-not-allowed !border-transparent;
@apply hover:!bg-[#CCCCCC];
}
/* Size variants */
.btn-sm {
@apply px-4 py-2 text-sm;
}
.btn-lg {
@apply px-8 py-4 text-lg;
}
/* Full width for mobile */
.btn-full {
@apply w-full;
}
/* Loading state */
.btn-loading {
@apply relative pointer-events-none opacity-75;
}
/* Icon spacing within buttons */
.btn-icon-left {
@apply flex items-center gap-2;
}
.btn-icon-right {
@apply flex items-center gap-2 flex-row-reverse;
}
/* Button groups - adjust border-radius for grouped buttons */
.btn-group {
@apply flex;
}
.btn-group > .btn-primary:not(:first-child):not(:last-child),
.btn-group > .btn-secondary:not(:first-child):not(:last-child),
.btn-group > .btn-danger:not(:first-child):not(:last-child) {
@apply rounded-none;
}
.btn-group > .btn-primary:first-child,
.btn-group > .btn-secondary:first-child,
.btn-group > .btn-danger:first-child {
@apply rounded-e-none;
}
.btn-group > .btn-primary:last-child,
.btn-group > .btn-secondary:last-child,
.btn-group > .btn-danger:last-child {
@apply rounded-s-none;
}
/* RTL support for icon buttons */
[dir="rtl"] .btn-icon-left {
@apply flex-row-reverse;
}
[dir="rtl"] .btn-icon-right {
@apply flex-row;
}
/* ==========================================================================
Form Styling System (Story 9.5)
========================================================================== */
/* Input field styling */
.input-field {
@apply w-full border border-charcoal/30 rounded-md px-4 py-3
focus:border-gold focus:ring-2 focus:ring-gold/20
transition-colors outline-none bg-white;
}
/* Input error state */
.input-error {
@apply border-danger focus:border-danger focus:ring-danger/20;
}
/* Form label styling */
.form-label {
@apply block text-sm font-semibold text-charcoal mb-2;
}
/* Required field indicator - for manual class usage */
.form-label-required::after {
content: ' *';
@apply text-danger;
}
/* Required indicator styling for Flux labels with .required class */
[data-flux-label].required::after {
content: ' *';
@apply text-danger;
}
/* Error message styling */
.error-message {
@apply text-sm text-danger mt-1;
}
/* Textarea specific styling */
.textarea-field {
@apply w-full border border-charcoal/30 rounded-md px-4 py-3
focus:border-gold focus:ring-2 focus:ring-gold/20
transition-colors outline-none bg-white
min-h-[120px] resize-y;
}
/* Select dropdown styling */
.select-field {
@apply w-full border border-charcoal/30 rounded-md px-4 py-3
focus:border-gold focus:ring-2 focus:ring-gold/20
transition-colors outline-none bg-white;
}
/* Custom checkbox styling */
.checkbox-custom {
@apply w-5 h-5 rounded border-charcoal/30 text-gold
focus:ring-gold focus:ring-offset-0;
}
/* Custom radio styling */
.radio-custom {
@apply w-5 h-5 border-charcoal/30 text-gold
focus:ring-gold focus:ring-offset-0;
}
/* Checkbox/Radio with error state */
.checkbox-error,
.radio-error {
@apply border-danger;
}
/* RTL support for form labels */
[dir="rtl"] .form-label {
@apply text-right;
}
/* RTL support for error messages */
[dir="rtl"] .error-message {
@apply text-right;
}
/* RTL support for form fields - use logical properties */
[dir="rtl"] .input-field,
[dir="rtl"] .textarea-field,
[dir="rtl"] .select-field {
@apply text-right;
}
/* ==========================================================================
Card & Container Styling System (Story 9.6)
========================================================================== */
/* Container max-width - 1200px centered */
.container-max {
@apply max-w-[1200px] mx-auto px-4 sm:px-6 lg:px-8;
}
/* Card shadow values */
.shadow-card {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.shadow-card-hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
/* ==========================================================================
RTL/LTR Layout Utilities (Story 9.8)
========================================================================== */
/* RTL-aware icon flipping - use on directional icons like chevrons, arrows */
[dir="rtl"] .flip-rtl {
transform: scaleX(-1);
}
/* Force LTR for numbers, emails, code, and other content that should stay LTR */
.ltr-content {
direction: ltr;
unicode-bidi: embed;
}
/* Inline LTR content within RTL text flow */
.ltr-inline {
direction: ltr;
unicode-bidi: isolate;
}