/**
 * Frinsa Logística – Styles
 *
 * Works on both the frontend (shortcode) and WordPress admin.
 * All classes prefixed with fl- to avoid conflicts with the theme.
 *
 * @package Frinsa_Logistica
 * @since   1.0.0
 */

/* ---------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------- */

.fl-wrap {
	max-width: 1400px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	color: #333;
}

.fl-table-responsive {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------------
 * Table
 * ------------------------------------------------------------- */

.fl-table {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
	background: #fff;
	border: 1px solid #ddd;
}

.fl-table thead {
	background: #f2f2f2;
	color: #fff;
}
.fl-table thead th {
	padding: 10px 12px;
	text-align: left;
	font-weight: 600;
	font-size: 13px;
	white-space: nowrap;
	border: none;
}

.fl-table tbody tr {
	border-bottom: 1px solid #eee;
}
.fl-table tbody tr:nth-child(even) {
	background: #f9f9f9;
}
.fl-table tbody tr:hover {
	background: #f0f4f8;
}
.fl-table tbody td {
	padding: 8px 12px;
	vertical-align: middle;
	border: none;
	text-align: left;
}

.fl-row-sent {
	background-color: #e8f5e9 !important;
}
.fl-row-sent:hover {
	background-color: #c8e6c9 !important;
}

/* Column widths */
.fl-col-check { width: 40px; }
.fl-col-order { width: 130px; }
.fl-col-bultos { width: 80px; }
.fl-col-tracking { width: 180px; }
.fl-col-actions { white-space: nowrap; }

/* ---------------------------------------------------------------
 * Inputs
 * ------------------------------------------------------------- */

.fl-input-bultos {
	width: 60px !important;
	padding: 4px 6px !important;
	border: 1px solid #ccc;
	border-radius: 3px !important;
	text-align: center;
	font-size: 14px !important;
}

.fl-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	box-sizing: border-box;
	margin-bottom: 15px;
}

/* ---------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------- */

.fl-btn {
	display: inline-block;
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: 100px;
	cursor: pointer;
	transition: background 0.2s, box-shadow 0.2s;
	vertical-align: middle;
}

.fl-btn-primary {
	background: #0b0b0b;
	color: #fcfcfc;
	border-color: #0b0b0b;
}
.fl-btn-primary:hover {
	background: #6b6b6b;
	color: #fcfcfc;
	border-color: #6b6b6b;
}

.fl-btn-secondary {
	background: #2e2e2e;
	color: #fcfcfc;
	border-color: #2e2e2e;
}
.fl-btn-secondary:hover {
	background: #6b6b6b;
	color: #fcfcfc;
	border-color: #6b6b6b;
}

.fl-btn-success {
	background: #28a745;
	color: #fff;
	border-color: #28a745;
}
.fl-btn-success:hover {
	background: #218838;
	color: #fff;
}

.fl-btn-info {
	background: #17a2b8;
	color: #fff;
	border-color: #17a2b8;
}
.fl-btn-info:hover {
	background: #138496;
	color: #fff;
}

.fl-btn-sm {
	padding: 3px 8px;
	font-size: 15px;
	border-radius: 100px;
	background: #0b0b0b;
	color: #fcfcfc;
	border-color: #0b0b0b;
}
.fl-btn-sm:hover {
	background: #6b6b6b;
	color: #fcfcfc;
	border-color: #6b6b6b;
}

.fl-btn-lg {
	padding: 12px 24px;
	font-size: 15px;
}

.fl-btn-icon {
	text-decoration: none;
    color: #fcfcfc;
    font-size: 12px;
    background: #0b0b0b;
    width: 20px;
    display: inline-flex;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-left: 4px;
}
.fl-btn-icon:hover {
	color: #005177;
}

.fl-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------
 * Albaran check
 * ------------------------------------------------------------- */

.fl-albaran-ok {
	color: #28a745;
	font-weight: bold;
	margin-left: 4px;
}

/* ---------------------------------------------------------------
 * Actions bar
 * ------------------------------------------------------------- */

.fl-actions-bar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-top: 20px;
	gap: 30px;
	flex-wrap: wrap;
}
.fl-actions-left,
.fl-actions-right {
	flex: 1;
	min-width: 250px;
}
.fl-actions-right {
	text-align: right;
}

/* ---------------------------------------------------------------
 * Modal
 * ------------------------------------------------------------- */

.fl-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255 255 255 / 50%);
	backdrop-filter: blur(10px);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fl-modal-content {
	background: #fff;
	padding: 25px 30px;
	border-radius: 6px;
	min-width: 380px;
	max-width: 500px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}
.fl-modal-content h3 {
	margin-top: 0;
}
.fl-modal-buttons {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	margin-top:10px;
}

/* ---------------------------------------------------------------
 * Spinner
 * ------------------------------------------------------------- */

.fl-loading {
	display: inline-block;
	margin-left: 10px;
}
.fl-loading::after {
	content: '';
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #f2f2f2;
	border-top-color: transparent;
	border-radius: 50%;
	animation: fl-spin 0.6s linear infinite;
	vertical-align: middle;
}
@keyframes fl-spin {
	to { transform: rotate(360deg); }
}

/* ---------------------------------------------------------------
 * Notices
 * ------------------------------------------------------------- */

.fl-notice {
	padding: 12px 16px;
	margin: 12px 0;
	border-left: 4px solid;
	background: #fff;
	border-radius: 3px;
}
.fl-notice-success {
	border-color: #28a745;
	background: #f0fff4;
}
.fl-notice-error {
	border-color: #dc3545;
	background: #fff5f5;
}
.fl-notice-warning {
	border-color: #ffc107;
	background: #fffdf0;
}

/* ---------------------------------------------------------------
 * Login form
 * ------------------------------------------------------------- */

.fl-login-wrap {
	max-width: 420px;
	margin: 40px auto;
	padding: 30px 35px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 6px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.fl-login-wrap h2 {
	margin-top: 0;
	color: #0b0b0b;
	text-align: center;
}
.fl-login-wrap p {
	color: #666;
	margin-bottom: 20px;
	text-align: center;
}
.fl-login-wrap label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
	color: #333;
	text-align: left;
}
.fl-login-wrap input[type="text"],
.fl-login-wrap input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	margin-bottom: 14px;
	box-sizing: border-box;
}
.fl-login-wrap input[type="text"]:focus,
.fl-login-wrap input[type="password"]:focus {
	border-color: #f2f2f2;
	outline: none;
	box-shadow: 0 0 0 1px #f2f2f2;
}
.fl-login-wrap .login-remember {
	margin-bottom: 14px;
}
.fl-login-wrap input[type="submit"] {
	width: 100%;
}

/* ---------------------------------------------------------------
 * Admin-specific overrides (wp-admin context)
 * ------------------------------------------------------------- */

.wrap .fl-wrap {
	max-width: none;
}
