/**
 * Give Payment History SCSS
 *
 * @description Payment History Styles
 * @package     Give
 * @subpackage  SCSS/Admin
 * @copyright   Copyright (c) 2016, WordImpress
 * @license     http://opensource.org/licenses/gpl-2.0.php GNU Public License
*/

//------------------------------------
// Payment Filters
//------------------------------------

// Wrapper for multiple filter fields.
.give-filters {
  clear: both;
  background: #f5f5f5;
  border: 1px solid #dfdfdf;
  padding: 12px 12px 0 12px;

  // Chosen height adjustment.
  .give-donation-forms-filter .chosen-single {
	height: 28px;
	line-height: 28px;
  }

  // Chosen up arrow.
  .chosen-container-single .chosen-single div b {
	background-position: 0 4px;
  }

  // Chosen down arrow.
  .chosen-container-active.chosen-with-drop .chosen-single div b {
	background-position: -18px 6px;
  }


  // Prevent select from causing line break flash.
  #give-payment-form-filter, #give_donation_forms_filter {
	display: inline-block;
	width: 300px;
	@media screen and (max-width: 782px) {
	  width: 100%;
	}
  }
  // Chosen / Select donation form filter dropdown.
  #give_donation_forms_filter {
	width: 255px;
	@media screen and (max-width: 782px) {
	  width: 100%;
	  max-width:100%;
	}
  }

  &:after {
	content: "";
	display: table;
	clear: both;
  }
}

// Individual filter field.
.give-filter {
  display: block;
  margin-bottom: 12px;
  width: 100%;

  &:after {
	content: "";
	display: table;
	clear: both;
  }

  label {
	display: block;
	margin-right: 4px;
  }

  input {
	margin: 0;
  }

  input[type="text"] {
	height: 28px;
	width: 100%;
  }

  input[type="text"],
  input[type="search"] {
	height: 28px;
  }

  .button {
	height: 28px;
	line-height: 26px;
	margin: 0;
	padding: 0 10px 1px;
  }

  select {
	width: 100%;
  }

  @media screen and (min-width: 783px) {
	float: left;
	margin-right: 18px;
	width: auto;

	label {
	  display: inline-block;
	}

	input[type="text"] {
	  display: inline-block;
	  width: 144px;
	}
  }
}

.give-filter-search {
  input[type="search"] {
	display: block;
	float: left;
	width: 68%;
  }

  input[type="submit"] {
	display: block;
	float: right;
	width: 30%;
  }

  @media screen and (min-width: 783px) {
	input[type="search"] {
	  display: inline-block;
	  margin-right: 4px;
	  width: 144px;
	}

	input[type="submit"] {
	  display: inline-block;
	  width: auto;
	}
  }
}

.give-filter-half {
  @media screen and (min-width: 600px) {
	float: left;
	width: 49%;

	&:last-child {
	  float: right;
	}
  }

  @media screen and (min-width: 783px) {
	width: auto;

	&:last-child {
	  float: left;
	}

	input[type="text"] {
	  width: 96px;
	}
  }
}

.give-clear-filters-button {
  margin-left: 8px;
}

.give-submit-wrap {
  clear: both;
  background: #f5f5f5;
  border: 1px solid #dfdfdf;
  margin: 8px 0;
  padding: 12px;
  font-size: 13px;
  line-height: 2.1em;
}

#give-payment-filters {
  ul.subsubsub {
	margin-bottom: 8px;
  }
}

#give-payments-advanced-filter {
  ul.subsubsub {
	margin-bottom: 12px;
  }
}

#give-payments-filter {
  .tablenav.top {
	float: none;
	.bulkactions {
	  margin-top: 1px;
	  padding-top: 0;
	}

  }

  .give-email-column-value {
	font-size: 14px;
	font-weight: bold;
  }

  #the-list .check-column input {
	margin-top: 1px;
  }

  .column-details {
	width: 50px;
  }

  .column-amount {
	width: 120px;
  }

}

tr.status-refunded td {
  background: #cecece;
  border-top-color: #ccc;
}

.wp-list-table.forms th#date {
  width: 140px;
}

.give-mobile-link {
  line-height: 32px;
  vertical-align: middle;
}

.give-mobile-link img {
  max-width: 80%;
  height: auto;
  float: left;
}

//------------------------------------
// Status Colors
//------------------------------------

.give-donation-status {
  > span {
	display: inline-block;
	width: 12px;
	height: 12px;
	position: relative;
	top: 1px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	background: #888;
	line-height: 16px;
  }

  //Pending
  &.status-pending > span {
	background-color: $orange;
  }

  //Complete
  &.status-complete > span, &.status-publish > span {
	background-color: $status-complete;
  }

  //Refunded
  &.status-refunded > span {
	background-color: $status-default;
  }

  &.status-failed > span {
	background-color: $red;
  }

  &.status-abandoned > span {
	background-color: $dark;
  }

  &.status-revoked > span {
	background-color: $status-revoked;
  }

  &.status-subscription > span, &.status-renewal > span, &.status-give_subscription > span {
	background-color: $status-subscription;
  }

}

//Test Payment Label
#test-payment-label {
  @include give-label();
  background-color: $orange;
  margin: 0 15px;
  vertical-align: middle;
}

//ID & link field
#give-payments-filter {

  .give-payment-id {
	@include give-label();
	font-weight: normal;
	@extend .give-item-label-gray;
  }

  .column-details {
	padding-right: 30px;
  }

  .give-donation-status {
	display: inline-block;
  }

}

//Payment View Metabox
#give-order-update {
  .give-donation-status {
	display: inline-block;
	float: none;
	margin: 0 10px;
	position: relative;
	top: 3px;
  }
}

//Donation Column
.column-donation_form {
  .donation-level-text-wrap {
	font-style: italic;
	display: block;
  }
}

/*---------------------
Responsiveness
---------------------------*/
@media handheld, only screen and (max-width: 640px) {
  .wp-list-table.forms th {
	width: auto !important;
  }
}

.download_page_give-payment-history .ui-dialog .ui-dialog-titlebar-close span {
  margin-left: -8px;
  margin-top: -8px;
}

/* Payment Details
-------------------------------------------------------------- */
.give-admin-box .label {
  font-weight: 600;
}

.give-admin-box-inside {
  margin: 0;
  padding: 3px 10px;
  clear: both;
  border-bottom: 1px solid #eee;
}

.give-admin-box-inside .strong {
  font-weight: 600;
}

.give-admin-box .right {
  float: right;
}

#give-order-update .inside,
#give-order-details .inside {
  margin: 0;
  padding: 0;
}

#give-order-update input.give_datepicker {
  width: 180px;
}

#give-order-update input[type="number"].give-payment-time-hour,
#give-order-update input[type="number"].give-payment-time-min {
  width: 50px;
}

.give-admin-box-inside:last-child {
  border-bottom: 0;
}

#give-edit-order-form .data-payment-key {
  word-break: break-all;
}

.give-order-update-box #major-publishing-actions .button-secondary {
  margin-right: 10px;
}

#give-donation-overview th {
  text-align: left;
}

#give-donation-overview .give-select-chosen {
  width: 97%;
}

#give-edit-order-form .row {
	margin-top: 10px;
}

#give-donation-overview ul,
#give-order-address-country-wrap select,
#give-donor-details .order-data-address input,
#give-edit-order-form .column input,
#give-donor-details .order-data-column p.data input {
  clear: both;
  display: block;
}

.give-order-data input.small-text {
  margin: 0;
}

#give-order-update span.label {
  display: inline;
  width: 50px;
}

.give-order-update-box .button-primary {
  margin-right: 0;
}

#give-edit-order-form .column .description {
  padding-right: 10px;
}

#give-edit-order-form .column,
#give-donation-overview .row > ul > li,
#give-donation-overview .inside > ul > li {
  display: inline-block;
  position: relative;
  vertical-align: top;
}

#give-donation-overview ul {
  font-size: 0;

  li {
	font-size: 13px;

	&.actions {
	  text-align: right;
	  min-width: 200px;
	}

	&.remove {
	  text-align: right;
	}

  }

  .row {
	padding: 12px;
	border-bottom: 1px solid #eee;
  }

}

#give-order-data .data span {
  color: #666;
  font-weight: 600;
}

input.give-price-field {
  width: 80px;
  padding: 3px 5px;
}

.give_forms_page_give-payment-history.js .postbox .hndle {
  cursor: default;
}

//------------------------------------------
//Payment Notes Section
//------------------------------------------

#give-payment-notes {
  textarea {
	min-height: 150px;
  }
  #give-add-payment-note {
	margin: 6px 0 15px;
  }

}

//------------------------------------------
//Edit Order Form
//------------------------------------------
#give-billing-details {
	.column > div {
		margin: 0 0 10px;
	}

	label {
		display: block;
		margin-bottom: 5px;
	}

	.column-container {
		padding: 5px 0 10px;
	}

	input[type="text"] {
		width: 98%;
	}

	.chosen-container {
		width: 98% !important;
	}
}

//------------------------------------------
//Responsive
//------------------------------------------
@media screen and (min-width: 1200px) {
	#give-edit-order-form .column {
		width: 33%;
	}

	#give-order-address .column {
		width: 49%;
	}

	#give-donation-overview.columns-4 li.actions {
		width: 25%;
		margin-top: 0;
		margin-right: 0;
	}
}

@media screen and (max-width: 1199px) {
  #give-edit-order-form .column {
	width: 49%;
  }
}

@media screen and (max-width: 782px) {
  .order-data-column input[type="email"] {
	padding: 6px 10px;
  }
}

//------------------------------------------
//Donation Details
//------------------------------------------
#give-donor-details .inside, #give-donation-overview .inside {
  margin-top: 0;
}

.give_forms_page_give-payment-history #give-dashboard-widgets-wrap #side-sortables {
  padding-top: 0;
}

//------------------------------------------
// Ajax chosen select field
//------------------------------------------
.give-select-chosen {
  .spinner {
	position: absolute;
	right: 5px;
	top: 2px;
	z-index: 999;
  }
}

.give-select-chosen-ajax {
  // Show spinner.
  .spinner {
	visibility: visible;
  }

  // Hide search icon.
  .chosen-search input[type="text"] {
	background-image: none !important;
  }
}

.give-select-chosen-ajax.chosen-container-single .chosen-search input[type="text"] {
  background-image: none !important;
}