/* File: albaran-style.css */

.albaran-tabs-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.albaran-tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
}

.albaran-tab-button {
    background-color: #f1f1f1;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 10px 20px;
    transition: 0.3s;
    font-size: 17px;
}

.albaran-tab-button:hover {
    background-color: #ddd;
}

.albaran-tab-button.active {
    background-color: #ccc;
}

.albaran-tab-content {
    display: none;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
}

.albaran-tab-content.active {
    display: block;
	background-color: white;
}

.albaran-history-table {
    width: 100%;
    border-collapse: collapse;
}

.albaran-history-table th, .albaran-history-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.albaran-history-table th {
    background-color: #f2f2f2;
}

.albaran-form-container {
    width: 100%;
	max-width: none;
}

.albaran-form-container form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.albaran-form-container .form-group {
    flex: 1 1 calc(50% - 0.5rem);
    display: flex;
    flex-direction: column;
}

.albaran-form-container label {
    margin-bottom: 0.25rem;
    font-weight: bold;
}

.albaran-form-container input,
.albaran-form-container textarea {    
    padding: 0.5rem !important;
    border: 1px solid #999 !important;
    border-radius: 4px !important;
	background-color: #f9f9f9 !important;
}

.albaran-form-container input:focus,
.albaran-form-container textarea:focus {
    border-color: #666 !important; /* Even darker border on focus */
    outline: none !important;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1) !important; /* Subtle shadow on focus */
}

.albaran-form-container input:hover,
.albaran-form-container textarea:hover {
    border-color: #777 !important; /* Slightly darker border on hover */
}

.albaran-form-container button {
    background-color: #ffa500;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
}

.albaran-form-container button:hover {
    background-color: #ff8c00;
}

.albaran-form-container .buttonx {
    background-color: #4facfe;
    margin-top: 0.3rem;
	margin-bottom: 0.3rem;
}

.albaran-form-container .buttonx:hover {
    background-color: #00f2fe;
}

.albaran-form-container #signature-pad {
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    margin-bottom: 0.5rem;
    height: 200px;
}

.albaran-form-container .form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.albaran-form-container .form-row .form-group {
    flex: 1;
}

.albaran-form-container .full-width {
    flex-basis: 100% !important;
}


.albaran-form-container .toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 5px;
    color: white;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7); /* Aggiungi un colore di sfondo */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Aggiungi un'ombra */
}

.albaran-form-container .toast-success {
    background-color: #4CAF50;
}

.albaran-form-container .toast-error {
    background-color: #F44336;
}

.albaran-form-container .toast-show {
    opacity: 1;
	display: block;
}

.albaran-form-container .date-input-container {
    position: relative;
    cursor: pointer;
}

.albaran-form-container .date-input-container input[type="date"] {
    cursor: pointer;
}

.albaran-form-container .date-input-container input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    color: transparent;
    background: transparent;
}


@media screen and (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
    }

    .albaran-tabs-container,
    .albaran-form-container,
    .albaran-form-container form,
    .albaran-tab-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    .albaran-form-container .form-row,
    .albaran-form-container .form-group {
        display: block !important;
        width: 100% !important;
        margin-bottom: 15px !important;
    }

    .albaran-form-container input[type="text"],
    .albaran-form-container input[type="number"],
    .albaran-form-container input[type="email"],
    .albaran-form-container input[type="date"],
    .albaran-form-container textarea,
    .albaran-form-container select,
    .albaran-form-container #signature-pad,
    .albaran-form-container button {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        margin-bottom: 10px !important;
    }

    .albaran-form-container label {
        display: block !important;
        margin-bottom: 5px !important;
    }

    .albaran-tabs {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .albaran-tab-button {
        flex: 1 1 auto !important;
        text-align: center !important;
    }
}