/*
 *  Copyright 2012 Anyware Services
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/*
 * CSS FOR FORMS
 */
 
.button 
{
	margin-top: 10px;
	text-align: right;
	margin-bottom: 13px;
}

.button input 
{
	display: inline-block;
}

.art-content .field .input, 
.art-content .field .select
{
	display: block;
	margin-right: 0;
	float: right;
}

.art-content .field .label 
{
	float: left;
	display: inline-block;
}

.art-sidebar1 .field .label label,
.art-sidebar2 .field .label label
{
	padding: 4px 0 2px 0;
	display: inline-block;
}

.field-end 
{
	clear: both;	
}

.mandatory-marker 
{
	color: red;
	margin-left: 3px;
}

fieldset 
{
	padding: 3px;
	margin-bottom: 12px;
}

.art-content .art-hmenu-form 
{
	float: none;
	padding-top: 0 !important;
	padding-right: 0 !important;
	padding-left: 0 !important;	
}

.art-content .field .input
{
	width: 40%;
	min-width: 245px;
	max-width: 900px;
}/*
 * CSS FOR FORMS
 */
 
.art-content .field,
.art-content .button 
{
	position: relative;
	margin-bottom: 13px;
}

.art-content .field
{
	text-align: left;
}
.art-content .button 
{
    text-align: right;
}

.art-content .field .select 
{
	display: block;
	margin-right: 0;
	float: right;
	width: 40%;
	min-width: 235px;
	max-width: 900px;
}

.art-sidebar1 .field .label label,
.art-sidebar2 .field .label label
{
	padding: 4px 0 2px 0;
	display: inline-block;
}

.field .invalid
{
    background: #FFFBDE;
    border: 1px solid #FF0000;
    border-radius: 4px;
}
.ametys-cms-content form .invalid
{
    border: 1px solid #FF0000;
    border-radius: 4px;
}

.art-sidebar1 .field .input,
.art-sidebar2 .field .input
{
	width: 96%;
}

.art-sidebar1 .field .select, 
.art-sidebar2 .field .select
{
	width: 96%;
}

/* INFOS */
form .info
{
	font-style: italic;
 	font-size: 0.9em;
 	clear: both;
}

form .info p
{
	margin: 0 !important;
}

.error
{
	color: #FF0000;
}

.error ul
{
	padding: 0;
	margin: 0;
}

.error ul li
{
    color: #FF0000;
    background: #FFFBDE;
    border: 1px solid #FF0000;
    list-style-type: none;
    line-height: 18px;
    margin: 5px 0;
    padding: 8px !important;
}

.error p
{
	margin: 0;
}

/** @Captcha */

div.captcha
{
	clear: left;
	padding-top: 5px;
}

img.captcha-image 
{
    margin: 0  !important;
    border: 1px solid #222;
    background-color: #fff;
    float: left;
}

button.captcha-refresh-btn {
	background: transparent url('/skins/uppa_cms-orange/resources/img/form/refresh_24.png') no-repeat left top;
	height: 26px;
	width: 26px;
	border: 0 none;
	margin-left: 5px;
	margin-top: 15px;
	cursor: pointer;
}

button.captcha-refresh-btn span {
	visibility: hidden;
	position: absolute !important;
	top: -10000px;
	left: -10000px;
}

.captcha .image-captcha-help {
	font-style:italic;
	clear: both;
	font-size: 0.9em;
}

.captcha-end
{
	clear: both;
}

/** @end captcha */

.forgot-password 
{
	text-align: right;
}
/*
 * CSS FOR FORMS AJOUT POUR MESSAGE D'ALERTE LIMITE ATTEINTE
 */

form[data-ametys-form-state]:not([data-ametys-form-state="open"]) > div[data-ametys-form] {
    pointer-events: none;
    opacity: 50%;
}

form:not([data-ametys-form-state="open"]) > *[data-ametys-form-fill="limit-text"] {
    opacity: 0%;
}


form[data-ametys-form-state="error"] > *[data-ametys-form-fill="starterror-text"] {
    color: #ff0000;
    position: absolute;
    z-index: 1;
    left: 20px;
    right: 20px;
    top: 20px;
    background-color: #fff;
}

form[data-ametys-form-state="closed"] > *[data-ametys-form-fill="limit-text"],
form:not([data-ametys-form-state="closed"]) > *[data-ametys-form-fill="closed-text"],
form:not([data-ametys-form-state="error"]) > *[data-ametys-form-fill="starterror-text"] {
    display: none;
}

form[data-ametys-form-state] {
    position: relative;
}

form[data-ametys-form-state="loading"] .form-limit-loading {
    position: absolute;
    z-index: 1;
    top: 10px;
    left: 0;
    right: 0;
    height: 64px;
    background-image: url(ametys-resource:///ametys-internal:sites/docs/ametys-internal:contents/limitation-du-nombre-d-entrees-de-formulaire-article/ametys-internal:attachments/loader.svg);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

form:not([data-ametys-form-state="loading"]) .form-limit-loading {
    display: none;
}